skillfed

pycookiecheat

Borrow cookies from your browser's authenticated session for use in Python scripts.

pycookiecheat v0.8.0 109.7K downloads/30d#12,505 on PyPI820
Permissive license MIT Active released

What it is and what it does

Pycookiecheat reads and decrypts cookies stored by your browser, allowing Python scripts to reuse an authenticated session without manual login. It works with Chrome, Firefox, Brave, and Slack on macOS and Linux, and can be used as either a command-line tool or imported as a library. The package handles browser-specific cookie storage formats and encryption, using cryptography and keyring to access stored credentials.

The main use case is automating requests that require browser authentication—for example, downloading files from a site where you're already logged in, or scraping pages that require a session. You pass a URL to get_cookies(), which returns decrypted cookies for that domain. The CLI can also output cookies in Netscape format for use with other tools.

Use it for:

  • Automate downloads from authenticated websites by reusing your browser's session cookies
  • Scrape web pages that require login by borrowing cookies from your already-authenticated browser session
  • Export browser cookies to Netscape format for use with command-line tools
  • Build scripts that interact with web services you're logged into without hardcoding credentials
  • Test web applications by programmatically using cookies from a real browser session

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Extracts and decrypts cookies from Chrome, Firefox, Brave, and Slack browsers on macOS and Linux for use in Python scripts.

Yes, if you need to automate requests with browser authentication on macOS or Linux. Install friction is low, maintenance is active, and there are no known vulnerabilities. The MIT license poses no restrictions. Caveat: Linux users may need to install system packages for keyring support, and Windows is not supported.

Install

pycookiecheat on PyPI

pip

pip install pycookiecheat

uv

uv add pycookiecheat

poetry

poetry add pycookiecheat

Installing pycookiecheat

Before you install

Low install friction with a pure-Python wheel. Maintenance is active with recent commits. Runtime dependencies are cryptography and keyring, both stable libraries. Linux users may need system packages for alternative keyring support.

License in practice

MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install pycookiecheat

from pycookiecheat import get_cookies, BrowserType

cookies = get_cookies('https://example.com')

# Or specify a different browser:
cookies = get_cookies('https://example.com', browser=BrowserType.FIREFOX)

On Linux, you may need to install libsecret-1-dev and python3-gi system packages, and use --system-site-packages when creating a virtualenv. Windows is not supported.

Verify before relying

  • Whether all Chromium-based browsers beyond Chrome, Brave, and Slack are supported via manual cookie_file paths
  • Whether Windows support has been added since the FAQ stated it was not planned

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — cryptography, keyring
Maintenance actively maintained — 649 days since the last release
Last repo commit
First released
Downloads 109,657/month — #12,505 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pycookiecheat-0.8.0-py3-none-any.whl

Keywords: pycookiecheat, chrome, chromium cookies, cookies, firefox

Natural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

extract browser cookies pythonchrome cookies python scriptdecrypt browser session cookiesbrowser authentication automationfirefox chrome cookie extraction
browser-automationcookie-handlingsession-reuse

More Utilities packages