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

Country Codes Does Not Match Google's Own Country Code List #55

Closed
inkrh opened this issue Jun 29, 2019 · 0 comments
Closed

Country Codes Does Not Match Google's Own Country Code List #55

inkrh opened this issue Jun 29, 2019 · 0 comments
Labels

Comments

@inkrh
Copy link

inkrh commented Jun 29, 2019

Describe the bug
play_scraper/constants.py - GL_COUNTRY_CODES list, any gl= must match, but this does not match Google's own country code list at https://developers.google.com/public-data/docs/canonical/countries_csv, which leads to 404 errors on countries listed in GL_COUNTRY_CODES and valid country codes being rejected.

To Reproduce

  1. Run any play_scraper call with a gl="kp", valid according to play-scraper, not valid according to Google:
    requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://play.google.com/store/apps/developer?id=&gl=kp&hl=en

  2. Run play_scraper with gl='im' results in error from play-scraper:

ValueError: im is not a valid geolocation country code.

However https://play.google.com/store/apps/developer?id=&gl=im results in valid content from Google.

Expected behavior
More maintained GL_COUNTRY_CODE list, or allowing overrides to not validate internally.

@inkrh inkrh added the bug label Jun 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant