The browser cookie extraction currently only works on Windows. macOS and Linux users are forced to use manual cookie entry, which requires opening DevTools, finding the cookies tab, and copy-pasting two values. This is the biggest friction point for non-Windows users.
What should happen
Extend browser_cookies.py to support Chrome/Edge/Brave cookie extraction on macOS and Linux.
Things to consider
- Cookie storage locations differ per OS:
- macOS:
~/Library/Application Support/Google/Chrome/Default/Cookies (SQLite, encrypted with Keychain)
- Linux:
~/.config/google-chrome/Default/Cookies (SQLite, encrypted with GNOME Keyring or KWallet)
- macOS encryption uses the system Keychain. You'll need
security find-generic-password or the keyring Python package to get the decryption key
- Linux encryption uses PBKDF2 with a key from the system keyring (GNOME Keyring, KWallet, or a hardcoded fallback key)
- The current Windows implementation uses Chrome DevTools Protocol (CDP) to grab cookies from a running browser. This approach also works on macOS/Linux and might be simpler than dealing with encrypted SQLite databases
- Test on actual macOS and Linux machines. Cookie formats and encryption change between browser versions
- Consider adding this as a separate module per platform to keep the code organized
Note: I have tested things out in windows. So support from other OS users will help a lot to make sure things are proper in Mac and Linux!
The browser cookie extraction currently only works on Windows. macOS and Linux users are forced to use manual cookie entry, which requires opening DevTools, finding the cookies tab, and copy-pasting two values. This is the biggest friction point for non-Windows users.
What should happen
Extend
browser_cookies.pyto support Chrome/Edge/Brave cookie extraction on macOS and Linux.Things to consider
~/Library/Application Support/Google/Chrome/Default/Cookies(SQLite, encrypted with Keychain)~/.config/google-chrome/Default/Cookies(SQLite, encrypted with GNOME Keyring or KWallet)security find-generic-passwordor thekeyringPython package to get the decryption keyNote: I have tested things out in windows. So support from other OS users will help a lot to make sure things are proper in Mac and Linux!