Как установить куку такого вида?
SyncTimeData={'origtime': 1497735776406, 'offset': 13}
Использую requests
При попытке преобразовать имеющиеся куки в словарь, добавить в словарь вложенный словарь SyncTimeData и установить полученное в виде куки получаю ошибку.
con = s.post("https://url", json=payload, headers=hdrs, cookies=ck)
File "test.py", line 313, in <module>
test()
File "test.py", line 271, in marathon
con = s.post("https://url", json=payload, headers=hdrs, cookies=ck)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 500, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 443, in request
prep = self.prepare_request(req)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 374, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/usr/lib/python3/dist-packages/requests/models.py", line 306, in prepare
self.prepare_cookies(cookies)
File "/usr/lib/python3/dist-packages/requests/models.py", line 508, in prepare_cookies
cookie_header = get_cookie_header(self._cookies, self)
File "/usr/lib/python3/dist-packages/requests/cookies.py", line 134, in get_cookie_header
jar.add_cookie_header(r)
File "/usr/lib/python3.4/http/cookiejar.py", line 1329, in add_cookie_header
attrs = self._cookie_attrs(cookies)
File "/usr/lib/python3.4/http/cookiejar.py", line 1288, in _cookie_attrs
self.non_word_re.search(cookie.value) and version > 0):
TypeError: expected string or buffer