rookiepy
raw JSON → 0.5.6 verified Sat May 09 auth: no python
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 Common errors
error ModuleNotFoundError: No module named 'rookiepy' ↓
cause rookiepy not installed or installed in a different environment.
fix
Run
pip install rookiepy and ensure you are using the correct Python environment. error rookiepy.load() missing required argument: 'domain' ↓
cause The `domain` parameter is required to filter cookies.
fix
Pass the domain string:
load(domain='example.com'). error PermissionError: [Errno 13] Permission denied: '/Users/.../Cookies' ↓
cause 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.
error rookiepy.load() got an unexpected keyword argument 'browsers' ↓
cause The parameter is `browser` (singular), not `browsers`.
fix
Use
browser=['chrome'] (singular) instead of browsers. Warnings
gotcha On 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.
gotcha Chrome 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.
breaking The 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`.
gotcha On 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.
Imports
- load
from rookiepy import load - to_netscape
from rookiepy import to_netscape - to_cookiejar
from rookiepy import to_cookiejar - chrome
from rookiepy import chrome
Quickstart
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)