Jan Novak added the comment:
New examples with the structured data.
Problems are with quotes and spaces inside { or [
cookie-script.com set those cookie data:
CookieScriptConsent={"action":"accept","categories":"[\\"performance\\"]"}
Python loads only cookies before that JSON structure
>>>
Jan Novak added the comment:
Possible patch, load parts one by one:
http_cookie = 'id=12345; [object Object]=data; something=not_loaded'
for cookie_key in http_cookie.split(';'):
c.load(cookie_key)
print c
Set-Cookie: id=12345
Set-Cookie: something=not_loaded
--
New submission from Jan Novak :
If brackets [] are around cookie name,
next cookie names are not loaded.
try:
import http.cookies as Cookie
except ImportError:
import Cookie
c = Cookie.SimpleCookie()
c.load('id=12345; [object Object]=data; something=not loaded')
print(c)
Note:
It could