-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Python requests banned? #580
Comments
@johnoliver any ideas here? I can confirm that I'm also seeing the same error when using the above test file |
I wonder if its related to the hosting provider, see a similar SO question about cloudflare: This sounds like some protection mechanism against data scraping. |
I tested the above snippet and can confirm that I also receive a 403 error. However, by simply adding a User-Agent header like that:
the request passes:
|
Describe the bug
I am building a Python app and part of it interfaces with the Adoptium API. Using the Requests library, which sends user-agent
python-requests/2.31.0
by default, gives a 403 forbidden error. Not sending a user-agent at all also causes a 403 forbidden. Setting the user-agent to something else fixes the issue, but it shouldn't be a necessary workaround, any user-agent should be allowed.To Reproduce
pip install requests
Expected behavior
It works with the default requests config
Screenshots
Doesn't work with the regular header.
Works when you put some random one. Crazy stuff, one http header is the entire difference between failure and success.
Device (please complete the following information):
Additional context
Looks to be an azure misconfiguration. Also this happened before but it wasn't fixed properly.
The text was updated successfully, but these errors were encountered: