Skip to main content

Chrome Cookiejar

This module helps to utilize your Chrome cookies in Python scripts. It's especially useful when scraping sites that requires login, as you can test your ideas easily without solving the CAPTCHAs and emulating the whole login process.

Supported platforms

This package is only tested on Python 3.

Please also note that values of cookies are encrypted with platform specific algorithms since Chrome 33. The decrypt helper for Windows is already included; however, only older versions of Chrome is currently supported on macOS or Linux.

Get started

Use the following code snippet to create an instance of http.cookiejar.CookieJar that includes all cookies from your Chrome browser:

>>> from chrome_cookiejar import ChromeCookieJar
>>> cookiejar = ChromeCookieJar('/path/of/your/Cookies')  # doctest: +SKIP

The file path is optional; if omitted, the library will try to read cookies from the default user profile path of Chrom(ium). If you're not sure, check chrome://version and follow the Profile Path shown here.

As the Cookies file is a SQLite database, you could filter the host domain with SQL wildcards:

>>> import requests, re
>>> jar = ChromeCookieJar(host_filter='%gith_b.com')
>>> login_user = re.compile(r'<meta name="user-login" content="(.+?)">')
>>> login_user.findall(requests.get('https://github.com', cookies=None).text)
[]
>>> login_user.findall(requests.get('https://github.com', cookies=jar).text)
['Arnie97']

Metadata

Release files for chrome-cookiejar 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chrome-cookiejar 0.1.0
File Size Uploaded Provenance Actions
chrome-cookiejar-0.1.0.tar.gz 5.6 kB Without provenance Details for chrome-cookiejar-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chrome-cookiejar 0.1.0
File Interpreter ABI Platform Actions
chrome_cookiejar-0.1.0-py3-none-any.whl Python 3 none any Details for chrome_cookiejar-0.1.0-py3-none-any.whl

Total release size: 12.9 kB

Release files / chrome-cookiejar-0.1.0.tar.gz

Download URL chrome-cookiejar-0.1.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
721ad6ca1cadb6fb50e3a26b404c33b9635dc6bc995879d17f4deebf20b14c25
BLAKE2b-256 checksum
How to use checksums
f1ed75a55d7dc5ba06d9aac96bf58efc92f4d578679942e7beb068f6c88feab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.3

Release files / chrome_cookiejar-0.1.0-py3-none-any.whl

Download URL chrome_cookiejar-0.1.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e409701080c9e4a1c7fdc463c488e56fc40a822e5cd36a070b39b6fe6262c5a7
BLAKE2b-256 checksum
How to use checksums
ff268f47baa26a4809970f4756aa5071e973f83c5d6af3fc9b1cbf81297d130f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.3

Security for chrome-cookiejar 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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