What do you use to submit to AtCoder? I think the majority of people on the AtCoder site say that, but I think there are also people who use atcoder-cli and online-judge-tools. I wanted to be able to submit it automatically by referring to [this site (and related articles)] 1, but it didn't work, so I wrote this article.
First of all, as shown in [Site] 1, even if I try to implement it, I cannot submit it successfully. Why. I spent about 3 days investigating the cause of this. That's stupid! !! However, if you are reading this article, I don't think you will play my second dance! !!
First of all, I suspected that I couldn't log in. So I tried to reproduce the environment where I could not log in with a web browser.
For example, in [AtCoder Login] 2, try to make a mistake in the account name and password. Then, after all, you will be notified that you could not log in and you will stay on the same site, right? So, first of all, I doubted the redirect destination.
Also, I found it interesting when I was playing around with it, so I would like to introduce my [another article] 3.
After the post process of [Site] 0
print(result.url)
Write this and use .url to find the redirect destination. Then I
https://atcoder.jp:443/home
It was displayed like this. So if I changed the login url to this, I was able to log in and submit it normally. Please give it a try. If you are worried, you can write it with try ~ except statement without changing login_url and using the method of checking if you can log in [My article] 3.
Thank you for reading. The article has become quite confusing, but I hope you find it helpful. If you have any suggestions, I would appreciate it if you could comment. Thank you very much.
Recommended Posts