Closed mikelabonte closed 1 month ago
Looks like this project is not maintained anymore. Forked it and updated to work with latest Python: binary-cookies-reader.
Easy to install
pip install binary-cookies-parser
and works from terminal
bcparser <path_to_binary_cookies_file>
or
from binary_cookies_parser.parser import read_binary_cookies_file
cookies = read_binary_cookies_file("path/to/cookies.binarycookies")
Fast forward to 2024 and this did not work for me out of the box using Python 3.12.2. In general the handling of byte data isn't working, beginning with the file signature check which results in the error: "Not a Cookies.binarycookie file". But also, StringIO didn't work.
I got it working, but actually I had grabbed a different version at https://github.com/ktnjared/BinaryCookieReader . I've never done a pull request before but I'm not sure which version to start with if I were to do so. The core changes I made are (line numbers are off because I made other changes):
16c19 < from io import StringIO