Answer the question
In order to leave comments, you need to log in
How to get cookie data for post request?
I want to send a post request to the site. This requires a csrf token and a few more variable variables. The problem is how to get these variables, which would then be inserted into the main post request. I tried this, but only 1 of the variables I need is displayed.
import requests
cl = requests.session()
cl.get('https://myurl')
print(cl.cookies.get_dict())
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question