I want to get the domain of the cookie from the HTTP response. Code is:
cookie = Cookie.SimpleCookie()
cookie.load(cookie_string)
print 'cookie = ', cookie
this shows the cookie as
cookie= Set-Cookie: Cycle=MA==|MA==|MA==; Domain=.abc.xyz.net; expires=Tue, 05-Oct-2021 04:15:18 GMT; Path=/
I want to extract the domain from the above result.
I am trying
print cookie['Domain']
print cookie['Domain'].value
print cookie['Cycle']['Domain'].value
None of these work.
Thanks
try:
cookie['Cycle']['domain'] # lowercase domain !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With