JoMingyu / google-play-scraper

Google play scraper for Python inspired by <facundoolano/google-play-scraper>
MIT License
757 stars 206 forks source link

Adding fallback call for unsupported urls #124

Closed chaotic-dice closed 2 years ago

chaotic-dice commented 2 years ago

In some cases the url would return a 404 even though it is a valid app. The reason for the 404 was the inclusion of the country parameter. Once it was removed the request worked as intended. To solve this I added a try exception to catch the 404 returned to app.py and make 1 more request to the same URL without the country parameter in case that was the reason for the failure.

An example of this: https://play.google.com/store/apps/details?id=ca.walmart.ecommerceapp&hl=en&gl=us https://play.google.com/store/apps/details?id=ca.walmart.ecommerceapp&hl=en

JoMingyu commented 2 years ago

really nice. I'll fix some tests and release it at tonight(KST).