I'm trying to use Python to authenticate to
If yes, is there any package that helps me to do this? Or some other method.
CodePudding user response:
The login page makes a GET request to https://anchor.fm/api/csrf
to get a csrf token. This request also sets a cookie, which is then sent together with the login form. I haven't checked that, but it seems it should be enough to make that GET request, grab the csrf token and the cookie, and attach them to the POST you make with the login form. (the csrf token in the _csrf
body field, as you noted)