I am basically running my personal project,but i'm stuck in some point.I am trying to make a login request to hulu.com
using Python's request
module but the problem is hulu
needs a cookie and a CSRF
token.When I inspected the request with HTTP Debugger it shows me the action URL
and some request
headers.But the cookie and the CSRF
token was already there.But how to can do that with request module? I mean getting the cookies and the CSRF
token before the post request? Any ideas?
Thanks
Asked
Active
Viewed 948 times
0

ShivaGaire
- 2,283
- 1
- 20
- 31

Johnny Doe
- 35
- 1
- 7
1 Answers
0
First create a session then use GET and use session.cookies.get_dict()
it will return a dict and it should have appropriate values you need

Shubhitgarg
- 588
- 6
- 20
-
If you dont know about session start from here http://docs.python-requests.org/en/master/ – Shubhitgarg Feb 23 '18 at 03:51