-
Notifications
You must be signed in to change notification settings - Fork 495
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
update script to https #4348
update script to https #4348
Conversation
@thecodingwizard any idea why this doesn't work? python can't fetch https://usaco.org/current/data/dec23_gold_results.html properly, but javascript fetch can? |
What do you mean by "doesn't work"? Maybe USACO's ddos protection (cloudflare) thinks we're trying to ddos them. That would be very, very annoying. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
wait it still doesn't work though 😭 |
oh.. what if you try a different library, like requests? https://pypi.org/project/requests/ (You are running locally, not on Github Actions, right?) |
import urllib.request
req = urllib.request.Request("https://usaco.org/current/data/dec23_gold_results.html", headers={'User-Agent' : "Magic Browser"})
con = urllib.request.urlopen( req )
print(con.read()) Have you tried this fix from here? Seems to work locally for me. |
works for me locally too, lets hope it works on gh actions 🙏 thanks for the help! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
wait what, the workflow on master suddenly started working again 😭 (ah nvm it was for a diff reason) |
Place an "x" in the corresponding checkbox if it is done or does not apply to this pull request.