[New-bugs-announce] [issue45802] MozillaCookieJar can't read cookies, should support cookies.sqlite

Akkana Peck report at bugs.python.org
Sat Nov 13 12:11:09 EST 2021


New submission from Akkana Peck <akkzilla at shallowsky.com>:

http.cookiejar.MozillaCookieJar only reads from cookies.txt, a format that Mozilla hasn't used in over a decade. It should read the file mozilla actually uses, cookies.sqlite.

Here's some code that works to turn cookies.sqlite into cookies.txt in order to read it in to MozillaCookieJar:
 http://blog.mithis.net/archives/python/90-firefox3-cookies-in-python

This was requested in 2008 in issue 2277, around the time Mozilla made the switch. The issue was rejected back then because it was too late to make the final beta for Python 2.6/3.0. I'd like to bring it up again now.

I can write a patch (since a real fix should read the cookies into the cookiejar directly, not use StringIO to create an intermediate cookies.txt) if there's any chance it would be accepted.

----------
components: Library (Lib)
messages: 406288
nosy: akkana
priority: normal
severity: normal
status: open
title: MozillaCookieJar can't read cookies, should support cookies.sqlite

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45802>
_______________________________________


More information about the New-bugs-announce mailing list