I'm trying to download an APK file from [this GooglePlay direct link generator][1] using Firefox Webdriver, Selenium and Python.

The problem is that, when Selenium is trying to get the home page, it crashes with the following error message:

Downloader

Please note that you are using an unsupported browser. Some screens may not work as expected.

The exception throws on this line: browser.get('https://apps.evozi.com/apk-downloader/?id=com.instagram.android')

As you see above, the origin of this error is a wrong link in the page that selenium is trying to download it. I found the frame that cause this error:

As you can see, the webpage developer put httpss instead of https wrongly (twice!).

How can I handle this problem?

Update:

My scraper:

Abraham
AbrahamAbraham

3 Answers

Evozi'

One solution would be a url-parsing funktion, that you call on each url before driver.get(url)

You'd then use it like so

jlaurjlaur
jlaurjlaur

Evozi Apk Downloader

The parser is not able to extract the proper url in this line apk_link = browser.find_element_by_css_selector('.btn.btn-success.btn-block').get_attribute('href')

Evozi S Apk Downloader

As when you print the url its showing https://apps.evozi.com/apk-downloader/?id=com.instagram.android

Just change the line to

The code will work without error

thebadguythebadguy
Evozi's Apk Downloader

Google Play Store

Not the answer you're looking for? Browse other questions tagged pythonseleniumiframe or ask your own question.