Message129223
I'm trying to use cookielib.LWPCookieJar.save() to save cookies from a website. The cookie file is created with a header line, but the cookies are not stored. Example program attached.
Python version:
2.5.2 (r252:60911, Jan 24 2010, 14:53:14)
Running on Debian lenny as a guest on Virtualbox
Output from the attached file pasted below:
------------
mike@debian:~$ python cookieexample2.py
Here are the headers of the page :
Server: none
Content-Type: text/html
Pragma: no-cache
Cache-Control: no-cache
Expires: Tue, 04 Dec 1993 21:29:02 GMT
Vary: Accept-Encoding
Date: Wed, 23 Feb 2011 20:43:55 GMT
Transfer-Encoding: chunked
Connection: close
Connection: Transfer-Encoding
These are the cookies we have received so far :
0 : <Cookie BIGipServerdiy_pool=604317450.20480.0000 for www.diy.co.uk/>
1 : <Cookie BIGipServerdiy_pool=637871882.20480.0000 for www.diy.com/>
2 : <Cookie DYN_USER_CONFIRM=1ab776eae0bf5661a2955c6ec7858439 for www.diy.com/>
3 : <Cookie DYN_USER_ID=1619150879 for www.diy.com/>
4 : <Cookie JSESSIONID=OVHJMMEHW4LOQCRHAWVCFFIKE2C0YIV0 for www.diy.com/>
mike@debian:~$
Contents of cookie.lwp afterward:
------------
mike@debian:~$ cat cookies.lwp
#LWP-Cookies-2.0
mike@debian:~$
Behavior is nearly identical using cookielib.MozillaCookieJar except the headers are different in the saved cookie file. Cookies themselves are not saved.
I am new to Python, so I hope this is not user error. |
|
Date |
User |
Action |
Args |
2011-02-23 20:50:28 | mcencula | set | recipients:
+ mcencula |
2011-02-23 20:50:27 | mcencula | set | messageid: <1298494227.02.0.739636898922.issue11301@psf.upfronthosting.co.za> |
2011-02-23 20:50:24 | mcencula | link | issue11301 messages |
2011-02-23 20:50:24 | mcencula | create | |
|