How to add a cookie to the cookiejar in python requests library
Quick Answer Option 1 import requests s = requests.session() s.cookies.set(“COOKIE_NAME”, “the cookie works”, domain=”example.com”) Option 2 import requests s = requests.session() # Note that domain keyword parameter is the only optional parameter here cookie_obj = requests.cookies.create_cookie(domain=”example.com”,name=”COOKIE_NAME”,value=”the cookie works”) s.cookies.set_cookie(cookie_obj) Detailed Answer I do not know if this technique was valid when the original question was … Read more