How to set a cookie using requests
Clash Royale CLAN TAG#URR8PPP
How to set a cookie using requests
I am trying to set a cookie and there does not seem to be much out there on how to set the cookie after creating the cookie. This is what I have so far:
import requests
url = '--REDACTED--'
cookies = dict(cookies_are='working')
r = requests.get(url, cookies=cookies)
r.text
What now? When I visit the website, I do not see the cookie in my browser's cookie manager so this code alone is insufficient to set the cookie.
I've read about sending the cookie through a header, but have been unable to find any example code on how to do that.
Mostly been relying on these so far:
https://jayconrod.com/posts/17/how-to-use-http-cookies-in-python
http://docs.python-requests.org/en/latest/user/quickstart/#cookies
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.