-
Notifications
You must be signed in to change notification settings - Fork 129
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
HTTP Response 429 (Too Many Requests) if I select Open Street Maps #7
Comments
I'm not sure if it goes against OSM terms and conditions |
I made a small example. I try to download the OSM tile in two ways:
Only the second method works with OSM. Code:
Result:
If you change url to another tile server, for example: https://maps.wikimedia.org/osm-intl/1/0/0.png, both download methods are works properly:
OSM server does not allow to download the tile if no headers is specified... |
Added Headers to fix issue AliFlux#7 .
Note that it is against OSM tiles server rules to bulk download tiles like this. |
You need find a way for add header at request 'urllib.request.urlretrieve', like this: {"User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"} ?
Your code should seem like a Webbrowser for OSM servers, not a script.
The text was updated successfully, but these errors were encountered: