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

Request error 503, add appropriate headers #13

Closed
VytM opened this issue Jan 6, 2019 · 1 comment
Closed

Request error 503, add appropriate headers #13

VytM opened this issue Jan 6, 2019 · 1 comment

Comments

@VytM
Copy link

VytM commented Jan 6, 2019

This issue is described here.

The bottom line is that Amazon blocks requests that do not come from a legitimate browser.
In order to combat it, we need to add appropriate headers:
headers = {'User-Agent' : 'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'}
req = urllib.request.Request (someUrl, headers=headers)

@VytM
Copy link
Author

VytM commented Jan 6, 2019

I did not see that you already have it in consts.py in URL_ADDONS variable.

@VytM VytM closed this as completed Jan 6, 2019
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

1 participant