I'm working with the python requests library. I am trying to load a requests session with a cookie from a dictionary:
cookie = {'name':'my_cookie','value': 'kdfhgfkj' ,'domain':'.ZZZ.org', 'expires':'Fri, 01-Jan-2020 00:00:00 GMT'}
I've tried:
s.cookies.set_cookie(cookie)
but this gives:
File "....lib\site-packages\requests\cookies.py", line 298, in set_cookie
if hasattr(cookie.value, 'startswith') and cookie.value.startswith('"') and cookie.value.endswith('"'):
AttributeError: 'dict' object has no attribute 'value'
What am I doing wrong?