Closed SprutSDM closed 2 years ago
Same issue as mentioned by @SprutSDM; library returning incorrect responses arbitrarily.
Hello,
I was facing this same issue happening on an irregular basis. On fetching the same app again after a while it often worked and sometimes it didn't. Initially I thought this error was because of some rate limiting by google wherein the webpage was showing some captcha or maybe returning a 429 Too many requests
response code?. So I started just adding a delay to the script after I got a response with null values in it. However, I dug in a little deeper.
I added the following code in request.py.
...
def _urlopen1(obj):
try:
resp = urlopen(obj)
print("response_code = " + str(resp.code))
package_name = obj.replace("https://play.google.com/store/apps/details?id=", "").replace("&hl=en&gl=us",
"").replace(".", "_")
text_file = open("/Users/abhimanyu/Projects/PlayStoreScreenshots/testfiles/" + package_name + ".html", "w")
text_file.write(str(resp.read()))
text_file.close()
filename = 'file:////Users/abhimanyu/Projects/PlayStoreScreenshots/testfiles/' + package_name + ".html"
webbrowser.open_new_tab(filename)
# print(str(resp.read()))
resp = urlopen(obj)
except HTTPError as e:
...
So now as I looped through many apps, I was seeing the response code for each request and also each request was saving the raw webpage on the file system and opening it in the browser so that I could see what exactly was google's server's returning.
I noticed 3 things.
I hope this helps shed more light on the issue and can help in fixing the issue sooner. Thanks.
Now, all my calls are returning Nulls. Is this also happening to you?
I haven't checked but the new UI is up so this is probably what is causing it.
i have the same problem ,all return Nulls
It fixed at version 1.1.0. It really hard to fix. I need to make a data path finder.
related commit: https://github.com/JoMingyu/google-play-scraper/commit/d53bbf383b93a5e9ece0a22eae9176449a646227
google_play_scraper.VERSION 1.0.5
Describe the bug Sometimes the library returns the incorrect response with empty/wrong fields.
Code google_play_scraper.app("com.android.chrome", lang="en", country="us")
Response:
Additional context I tested this with different applications and it turned out that it's not application dependent. It started on May 12th. I think Google Play is testing some feature as part of A/B testing.