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

User-Agent for HackerRank #629

Closed
kmyk opened this issue Dec 4, 2019 · 0 comments · Fixed by #630
Closed

User-Agent for HackerRank #629

kmyk opened this issue Dec 4, 2019 · 0 comments · Fixed by #630

Comments

@kmyk
Copy link
Member

kmyk commented Dec 4, 2019

ref #626 (comment)

Now HackerRank seems to be have banned User-Agents which contain python-requests as a substring. We use python-requests/x.y.z (+https://github.com/kmyk/online-judge-tools) as UA, and banned.
By the way, a string online-judge-tools is not banned. So it seems that we are just embroiled, and we should change the UA.

logs

https://github.com/kmyk/online-judge-tools/blob/7a8c94af9813dfd839ddf3c35c128c8fff12e90d/onlinejudge/_implementation/utils.py#L76

>>> requests.get('https://www.hackerrank.com/rest/contests/hourrank-30/challenges/video-conference/download_testcases')
<Response [403]>
>>> requests.get('https://www.hackerrank.com/rest/contests/hourrank-30/challenges/video-conference/download_testcases', headers={'User-Agent': 'curl/7.58.0'})
<Response [200]>
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

Successfully merging a pull request may close this issue.

1 participant