0

Response 405 in python requests post method

I am trying to login to a website using python requests but I am getting response 405 error. I almost added all the necessary things to login. I am able to login manually by entering email and password but unable to login with python requests. The given email and password is correct and csrf token is also correct. Can anyone help me to login to the website? https://code.sololearn.com/c7G68T84Jgrk/?ref=app

17th Jun 2023, 9:11 AM
Pardha Saradhi
1 Answer
+ 1
Observe the form tag in the html page that you are first trying to invoke. It has an action property which tells you which page is called when the form is submitted. action="../Playground/" So you should not use the same URL in your second request as your login form.
18th Jun 2023, 5:37 AM
Tibor Santa
Tibor Santa - avatar