Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] European countries not working for Google Play Search #213

Open
akg745 opened this issue Apr 14, 2024 · 2 comments
Open

[BUG] European countries not working for Google Play Search #213

akg745 opened this issue Apr 14, 2024 · 2 comments
Assignees

Comments

@akg745
Copy link

akg745 commented Apr 14, 2024

Library version: 1.2.6

Describe the bug
Using Google Play Search module with all European countries fails (e.g. country = 'fr' / 'be' / 'cz' / 'bg' / 'at'), error message:


TypeError Traceback (most recent call last)
Cell In[137], line 34
31 for keyword in keywords:
32 # try:
33 keyword = keyword.lower()
---> 34 results = search(keyword, country=country, n_hits=10)
35 for result in results:
36 app_difficulty = 0

File ~\Anaconda\lib\site-packages\google_play_scraper\features\search.py:41, in search(query, n_hits, lang, country)
38 dataset[key] = value
40 try:
---> 41 top_result = dataset["ds:4"][0][1][0][23][16]
42 except IndexError:
43 top_result = None

TypeError: 'NoneType' object is not subscriptable

Code
Copy and paste the code that have issue.

results = search("tax", country="de", n_hits=10)
results = search("tax", country="fr", n_hits=10)
results = search("tax", country="cz", n_hits=10)

Basically all EU countries have this bug

Additional context
Other countries work fine!

@akg745
Copy link
Author

akg745 commented Apr 20, 2024

Update: I have managed to fix this, it's a very easy fix to add another Error type (TypeError) in the Exception handling on the search function. Happy to all send in a PR to fix it if possible and if it saves @JoMingyu time!

@dri-mobisec
Copy link

Hi @akg745 could you explain in detail how you did the fix, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants