Looking for a urllib(2) cookie handler

Chris Rebert clp2 at rebertia.com
Tue Apr 19 08:57:02 EDT 2011


On Tue, Apr 19, 2011 at 5:48 AM, Mark Carter <alt.mcarter at gmail.com> wrote:
> On Apr 19, 12:44 pm, Mark Carter <alt.mcar... at gmail.com> wrote:
>
>> url and say "just use the cookie that I have in Firefox"?
>
> "mechanize" looks kinda like what I want, but i still can't get it to
> work properly. So far I have:
>
> import cookielib
> import mechanize
>
> cookiefile = "C:\\Users\\$ME\\AppData\\Roaming\\Mozilla\\Firefox\
> \Profiles\\zl648qvt.default\\cookies.sqlite"
> cookies = mechanize.MozillaCookieJar(filename = cookiefile,
> delayload=True)
<snip>
> where $ME and $URL are replaced with suitable values. It doesn't
> appear to acutally be "using" the cookies.

http://wwwsearch.sourceforge.net/mechanize/doc.html :
"Firefox since version 3 persists cookies in an sqlite database, which
is not supported by MozillaCookieJar."

Please see my prior response.

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list