Log in with Python requests and csrf token
|Added at||2016-12-20 00:12|
So here is what I have:
First part is to open the login page and get the csrf from header. Second part is to post the username, password, and _csrf. And I'm unable to login. It stays at the login page.
The form data when I inspect the login on the browser looks like:
Problem is the csrf form the first part is always different from the csrf (print r.text) on the second part. Seems like the post starts a different session and csrf gets a refresh.
How do I fix this? Thanks