Registry / http-networking / rookiepy

rookiepy

JSON →
library0.5.6pypypi✓ verified 86d ago

A Python library to load cookies from any browser on any platform. It supports Chrome, Firefox, Edge, Safari, Opera, Brave, and more. Version 0.5.6 is current, with active development on GitHub.

pip install rookiepy
INSTALL
IMPORT
SIG · ROOKIEPY
R
rookiepy
http-networkingpythonv0.5.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

load
from rookiepy import load
to_netscape
from rookiepy import to_netscape
to_cookiejar
from rookiepy import to_cookiejar
chrome
from rookiepy import chrome

Load cookies from Chrome for a specific domain and print them as Netscape format.

from rookiepy import chrome, load, to_netscape # Load cookies from Chrome domain = os.environ.get('DOMAIN', 'example.com') cookies = load(domain=domain, browser=['chrome']) print(cookies) # Convert to Netscape format netscape = to_netscape(cookies) print(netscape)
Debug
Known issues
gotchaOn macOS, loading cookies from Safari may require granting Full Disk Access to the terminal emulator.
fix
Grant Full Disk Access to Terminal/iTerm2 in System Preferences > Security & Privacy > Privacy > Full Disk Access.
affects: >=0.5.0
gotchaChrome v130+ on Windows uses appbound encryption. rookiepy can handle it, but requires additional binaries (distributed automatically). In some cases, antivirus may block the process.
fix
Ensure antivirus does not block rookiepy binaries. If issues persist, try running as administrator or using non-Chrome browser.
affects: >=0.5.4
breakingThe library's Python API changed from earlier versions; the main function is now `load` instead of previously documented names.
fix
Use `from rookiepy import load` and call `load(domain=..., browser=[...])`. Do not use older import paths like `rookiepy.chrome`.
affects: >=0.5.0
gotchaOn Linux, default Opera cookie paths may not be detected. You may need to specify the path manually.
fix
Upgrade to 0.5.3 or later, or pass the cookie path explicitly using `paths` argument.
affects: <=0.5.3
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'rookiepy'
rookiepy not installed or installed in a different environment.
fix
Run `pip install rookiepy` and ensure you are using the correct Python environment.
rookiepy.load() missing required argument: 'domain'
The `domain` parameter is required to filter cookies.
fix
Pass the domain string: `load(domain='example.com')`.
PermissionError: [Errno 13] Permission denied: '/Users/.../Cookies'
On macOS, the Python process does not have permission to access Safari or other browser's cookie files.
fix
Grant Full Disk Access to your terminal or IDE in System Preferences > Security & Privacy > Privacy > Full Disk Access.
rookiepy.load() got an unexpected keyword argument 'browsers'
The parameter is `browser` (singular), not `browsers`.
fix
Use `browser=['chrome']` (singular) instead of `browsers`.
Upgrade
Version history
0.5.6latest on PyPI · released Nov 1, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources