Skip to main content

rookie-cookies

Extract cookies from web browsers Bindings for rookie-cookies

Usage

from rookie_cookies import chrome
cookies = chrome()
for cookie in cookies:
    print(cookie['domain'], cookie['name'])

Firefox profiles

from rookie_cookies import firefox_profile, firefox_profiles

for profile in firefox_profiles():
    print(profile["name"], profile["path"], profile["is_default"])

cookies = firefox_profile("work", ["example.com"])

Chrome profiles

chrome() keeps its legacy default-first selection. Use the additive APIs to prefer Chrome's advisory active-profile hints while retaining report metadata:

from rookie_cookies import chrome_profile, chrome_profiles

profiles = chrome_profiles()
if profiles:
    report = chrome_profile(profiles[0]["profile"]["profile_id"], ["example.com"])
    print(report["status"])

Missing or malformed hints fall back to the generic order. A selector may also be a display name, directory name, or a full path when descriptor["profile"]["path_lossy"] is false; lossy paths require the profile ID. Ambiguous names raise instead of silently choosing a channel.

Browser registry and reports

from rookie_cookies import browser_profiles, browser_report, supported_browsers

for browser in supported_browsers():
    print(browser["id"], browser["display_name"], browser["engine"])

for profile in browser_profiles("chrome"):
    print(profile["profile"]["profile_id"], profile["profile"]["display_name"])

report = browser_report("chrome", domains=["example.com"])
for profile in report["profiles"]:
    for source in profile["sources"]:
        if source["selected"] and source["status"] == "succeeded":
            print(source["source"]["path"], len(source["cookies"]))

Reports keep failures visible instead of raising: a registered browser that is not installed is a report with status no_sources, and problems arrive as issues on the report, a profile, or a source. Only a bad request — an unknown browser ID or a profile ID this browser did not yield — raises, as a RuntimeError whose message is a diagnostic rather than a stable contract. load_report() covers every registered browser in one report.

An issue counts every occurrence in occurrences but keeps at most MAX_ISSUE_SAMPLES entries in samples; comparing the two tells a truncated excerpt from a complete one.

Every identifier and code (status, engine, role, format, severity, …) is an open snake_case string, so compare against a known value and keep a fallback: a build newer than your code can return one you have not seen.

Detailed cookies and explicit Chromium paths

from rookie_cookies import chromium_based_detailed, firefox_based_detailed

chromium_records = chromium_based_detailed(
    "/path/to/Brave/Default/Network/Cookies",
    ["example.com"],
    browser_id="brave",
)
firefox_records = firefox_based_detailed("/path/to/cookies.sqlite")

Each record contains the familiar cookie dictionary under cookie and a separate context dictionary. Existing functions and cookie dictionaries are unchanged. On Unix, chromium_based() also accepts browser_id as its third argument. Omit it only for plaintext-only databases; encrypted rows fail rather than using an assumed Chrome identity.

Netscape export

from rookie_cookies import chrome, to_netscape

output = to_netscape(chrome())

The serializer prevents extra columns or forged records by encoding tabs, carriage returns, and line feeds in cookie-controlled fields as %09, %0D, and %0A. Every other character is preserved. Its output is byte-identical to the Rust, CLI, and Node serializers for the same cookies.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rookie_cookies-0.5.9.tar.gz (263.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rookie_cookies-0.5.9-cp38-abi3-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.8+Windows x86-64

rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.7 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ s390x

rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.6 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.2 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

rookie_cookies-0.5.9-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl (2.6 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.12+ i686

rookie_cookies-0.5.9-cp38-abi3-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

rookie_cookies-0.5.9-cp38-abi3-macosx_10_12_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file rookie_cookies-0.5.9.tar.gz.

File metadata

  • Download URL: rookie_cookies-0.5.9.tar.gz
  • Upload date:
  • Size: 263.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rookie_cookies-0.5.9.tar.gz
Algorithm Hash digest
SHA256 a2434a59e887a5b1a49b893287d5e245ca84f637de2ed7fc7a0e73e687a04d83
MD5 73016e715539697a6bfa4971fbdec51a
BLAKE2b-256 11d28bd60734831d4ffb78d24593615a99916790ac6acd9d875676a167294b46

See more details on using hashes here.

Provenance

The following attestation bundles were made for rookie_cookies-0.5.9.tar.gz:

Publisher: publish-py.yml on teng-lin/rookie-cookies

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rookie_cookies-0.5.9-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for rookie_cookies-0.5.9-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e62821f09b711729cb3ef95b2f4e678a9ec20bf3f5f00156e7e458aad7e9a77c
MD5 e7a656594b8233f49cb12abd61e6186b
BLAKE2b-256 d35df70a3ddf0f26b1edf172356018c47120c91e478d74e0750803e86202347e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rookie_cookies-0.5.9-cp38-abi3-win_amd64.whl:

Publisher: publish-py.yml on teng-lin/rookie-cookies

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e94af5f031fc01f60ae34915acc1132f03c5b8d7bf926b601bd4fe36c1bccd20
MD5 ed35df8c84a74a0a636b119ff7287aac
BLAKE2b-256 59f1d7eb0dbe48c6ecfa5843f711e382833c3637a99cfbc5bcd02b136fcb0ba1

See more details on using hashes here.

Provenance

The following attestation bundles were made for rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-py.yml on teng-lin/rookie-cookies

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 9da9b0113b0f9ab583aa193820f9ad699706c5fbfa4ae13f10096aa098390d9b
MD5 02a2dd889a69a9e594c6daa615afb32e
BLAKE2b-256 c6d2c823393290f83c7f80f27cab48753e494415d83af9457acbe3de92881d8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl:

Publisher: publish-py.yml on teng-lin/rookie-cookies

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 a46f431b3bf822076f5fe70a20bbb8d21d31a14ec69c53408dbff7f1276fb0c4
MD5 8d3cf4afe7dbc85da942af3c87206f64
BLAKE2b-256 1266ceb1b45f4eae87411b5887e82d629ed2f0edb6c5f3a736ef6287256f1de4

See more details on using hashes here.

Provenance

The following attestation bundles were made for rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl:

Publisher: publish-py.yml on teng-lin/rookie-cookies

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 a260f1a16d683e7d31ecf653a6871ca65d1a4dcfcb8c70e8a3986670e29210e7
MD5 72ca2d748a6beec1119d8b9a0d0a8b42
BLAKE2b-256 9ec6fc07bb6ee5cfc982a781408beaf7983599592cd03661c2e5ef48c2d2a00b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl:

Publisher: publish-py.yml on teng-lin/rookie-cookies

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9de47d06607b1a82a08ef27ceff699262bccfe1eb94030a380e8e70675ed653a
MD5 90b73d9d352a0bab65344dcb8de4ecff
BLAKE2b-256 d7e6793b06c429a9b16542f7243e5ab691a021d2c3d59933fbb7ff218e39c78e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rookie_cookies-0.5.9-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish-py.yml on teng-lin/rookie-cookies

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rookie_cookies-0.5.9-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for rookie_cookies-0.5.9-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 e4c9d45260d2a70a0392bf9a976d9ae5709c7179674d9f95ec666ee045c89450
MD5 10df15c7334577bdd838dc49e9cca5d8
BLAKE2b-256 5866b868b0013e43d253dd21a8306fc36ac16167f44c2f0a105b3a46521f6a4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for rookie_cookies-0.5.9-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl:

Publisher: publish-py.yml on teng-lin/rookie-cookies

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rookie_cookies-0.5.9-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rookie_cookies-0.5.9-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a26e27aa0fae0fa49888651584afb6792d726d899cbb5342591ad32b674630eb
MD5 eb6a1f1796f1ad26d9b0c007c9ecbc98
BLAKE2b-256 57f2561033b1619f673422947995085fef01607f380eb569be190917326448c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for rookie_cookies-0.5.9-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: publish-py.yml on teng-lin/rookie-cookies

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rookie_cookies-0.5.9-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for rookie_cookies-0.5.9-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 04681ae9baeccbcd21184f862c4b85a93fbaf265758363a00a51b39d0489f59e
MD5 d753af03fb0567050199b7b0734644df
BLAKE2b-256 81b2796c79ef8ab877df8ecbebc61e37ae13db3537bce8247e4b6d77ef2770ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for rookie_cookies-0.5.9-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: publish-py.yml on teng-lin/rookie-cookies

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.6.0

6 files

This release

0.5.9 This release

10 files

0.5.8

10 files

0.5.7

10 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page