-
Notifications
You must be signed in to change notification settings - Fork 19
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
Codeforces login from terminal is broken and download samples requires login #73
Comments
Thank you for reporting! It seems that there is an update of Codeforces and this breaks our code. I'll fix soon. |
Now the $ curl 'https://codeforces.com/enter'
<html><body>Redirecting... Please, wait.<script type="text/javascript" src="/aes.min.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("e9ee4b03c1d0822987185d27bca23378"),b=toNumbers("188fafdbe0f87ef0fc2810d5b3e34705"),c=toNumbers("ebe0e82fefc615e78c3acba688bf16b1");document.cookie="RCPC="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/";document.location.href="https://codeforces.com/enter?f0a28=1";</script></body></html> |
I found blog posts about this |
related issue xalanq/cf-tool#112 |
Yeah it seems like recent change. That's why this problem suddenly start appearing. |
I checked the blogs. Lot's of people facing the bug |
This issue is difficult and I cannot fix immediately because this, the feature of RCPC tokens, is the feature to kill scraping scripts. (BTW, the bug of RCPC tokens doesn't affects us.) |
If i could help you to solve this problem, it would awesome. But i don't have that great knowledge. RCPC token will not affect us that's awesome to hear. |
I found this problem also breaks the feature to download sample cases. |
Shit man, they makes it so complex... Now may be need to use oj login.... Today i will change my code and turn towards using webdriver. |
This commit allow us to obtain sample cases without logging in. However, we cannot login without something like Selenium even with this commit, due to the tokens `ftaa` and `bfaa`. - see #73 - thanks to @9kin for his comment xalanq/cf-tool#112 (comment) - related #75
It seems that Codeforces reverted the change. (I found this while trying to parse the (edit) $ oj --version
[!] update available for online-judge-tools: 10.0.4 -> 10.0.5
[*] run: $ pip3 install -U online-judge-tools
[!] update available for online-judge-api-client: 10.2.1 -> 10.2.3
[*] run: $ pip3 install -U online-judge-api-client
online-judge-tools 10.0.4 (+ online-judge-api-client 10.2.1)
$ oj d https://codeforces.com/contest/1/problem/A
[!] update available for online-judge-tools: 10.0.4 -> 10.0.5
[*] run: $ pip3 install -U online-judge-tools
[!] update available for online-judge-api-client: 10.2.1 -> 10.2.3
[*] run: $ pip3 install -U online-judge-api-client
[*] online-judge-tools 10.0.4 (+ online-judge-api-client 10.2.1)
[x] clear the downloading history for this directory: /home/ryo/.cache/online-judge-tools/download-history.jsonl
[x] append the downloading history: /home/ryo/.cache/online-judge-tools/download-history.jsonl
[*] sample 0
[x] input: sample-1
6 6 4
[+] saved to: test/sample-1.in
[x] output: sample-1
4
[+] saved to: test/sample-1.out |
Description
A few user from my project ai-virtual-assistant inform me they tried to login into codeforces that is not working. Then i looked it into this it seems like oj-api login for codeforces not working. i tried to login manually even tried to login using oj-tools still it is not working. I hope you will check it.
Error log
The text was updated successfully, but these errors were encountered: