browser-cookie3
Loads cookies from your browser into a cookiejar object so can download with urllib and other libraries the same content you see in the web browser.
What it is and what it does
browser-cookie3 is a Python library that reads cookies stored by your web browser (Chrome, Firefox, Safari, Edge, Brave, Opera, and others) and exposes them as a standard Python cookiejar object. This allows you to use those cookies with HTTP libraries to make authenticated requests without needing to log in programmatically or manage credentials directly.
The package works by locating and parsing the browser's local cookie storage—typically SQLite databases or text files depending on the browser—and decrypting them where necessary. You can load all cookies from all browsers, filter by a specific browser, or filter by domain. It includes both a Python API and a command-line interface for extracting individual cookies.
Use it for:
- Web scraping sites where you're already logged in, reusing your browser session to avoid re-authentication.
- Automated testing of web applications using your real user session and cookies.
- Downloading content from authenticated services without hardcoding credentials in your scripts.
- Building tools that interact with web APIs on your behalf using your existing browser login state.
- Extracting specific cookies from your browser for use in curl, wget, or other tools via the CLI.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extracts cookies from your browser's local storage and loads them into a Python cookiejar object for use with HTTP libraries.
Yes, if you need to reuse browser cookies for web scraping or automation. Install friction is low and there are no known vulnerabilities. The main caveat is dormant maintenance (last release 602 days ago), so compatibility with very new browser versions is uncertain; test against your target browsers first. The lgpl copyleft license is permissive for most use cases but requires derivative works to remain open-source.
Install
browser-cookie3 on PyPI
pip
pip install browser-cookie3uv
uv add browser-cookie3poetry
poetry add browser-cookie3Installing browser-cookie3
Before you install
Low install friction with a pure-Python wheel. Maintenance is dormant (last release 602 days ago), though the repository remains active with 1066 stars and a recent commit on 2024-12-20. No security vulnerabilities reported.
License in practice
Licensed under lgpl (copyleft). You may use and modify the package freely, but any derivative work must also be distributed under copyleft terms.
Quickstart
pip install browser-cookie3
import browser_cookie3
cj = browser_cookie3.chrome()
cj = browser_cookie3.load()
cj = browser_cookie3.firefox(domain_name='example.com')
Requires browser cookie files to exist locally; supported browsers must have been used on the system and have stored cookies in their default locations.
Verify before relying
- Whether dbus-python and jeepney dependencies are required on all platforms or only Linux/macOS systems.
- Current compatibility with modern browser versions beyond the last tested dates in documentation.
- Whether shadowcopy dependency is actively maintained and what role it plays.
- How lz4 and pycryptodomex are used in cookie decryption and storage access.
Package facts
| License | lgpl (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — lz4, pycryptodomex, dbus-python, jeepney, shadowcopy |
| Maintenance | dormant — 602 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,939,881/month — #2,816 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: browser_cookie3-0.20.1-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
cookiesParses and renders HTTP Cookie and Set-Cookie…
permissive · top 15,000 on PyPI
pycookiecheatExtracts and decrypts cookies from Chrome,…
permissive · top 15,000 on PyPI
fetch-useRoutes HTTP requests through Browser-Use's…
permissive · top 5,000 on PyPI
streamlit-cookies-controllerProvides read, write, and delete operations on…
permissive · top 15,000 on PyPI
flask-unsignCommand-line tool to decode, brute-force, and…
permissive · top 15,000 on PyPI
macaroonbakeryMacaroonbakery provides HTTP authentication and…
copyleft · top 5,000 on PyPI
primpHTTP client library that mimics real web…
permissive · top 5,000 on PyPI
scrapy-impersonateA Scrapy download handler that replaces…
permissive · top 15,000 on PyPI
django-cookie-consentA Django application that manages cookie…
permissive · top 15,000 on PyPI
MechanicalSoupMechanicalSoup automates interaction with…
permissive · top 15,000 on PyPI