This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: MozillaCookieJar can't read cookies, should support cookies.sqlite
Type: Stage:
Components: Library (Lib) Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: akkana
Priority: normal Keywords:

Created on 2021-11-13 17:11 by akkana, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg406288 - (view) Author: Akkana Peck (akkana) Date: 2021-11-13 17:11
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.
History
Date User Action Args
2022-04-11 14:59:52adminsetgithub: 89960
2021-11-13 17:11:09akkanacreate