Skip to main content

No project description provided

Project description

PyPI Python

Overview

Small toolkit for capturing and dumping browser cookies via an embedded browser and then being able to use them from cURL or any way you see fit.

This supports crawling or capturing authenticated web content.

Requirements

Python 3.10 or newer (requires-python in pyproject.toml, aligned with PySide6).

Install

From the repository root:

pip install .

Build

From the repository root, install the build tooling (for example the dev extra, which includes build and twine), then run the packaging script:

pip install -e '.[dev]'
./infrastructure/build.sh

That runs python -m build and writes the wheel and sdist under dist/.

To publish those artifacts to PyPI (after configuring twine credentials), use:

./infrastructure/upload.sh

Tools

  • ct_authenticate: Opens an embedded Chromium window to the given URL. The output should be redirected. Login as necessary and press the "Done" button.

  • ct_to_curl: Reads the JSON output from ct_authenticate and prints curl cookie arguments

Example

ct_authenticate https://example.com > session.json
curl -s $(ct_to_curl < session.json) 'https://example.com/'

Tests

pytest

Project details


Download files

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

Source Distribution

cookietruck-0.1.2.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

cookietruck-0.1.2-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file cookietruck-0.1.2.tar.gz.

File metadata

  • Download URL: cookietruck-0.1.2.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for cookietruck-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f2a8ef22dff62e9109cdb35a19bb790ae12a12928f3fe173851968f925687a7f
MD5 923a2075f0688d75d3377959a691a8ee
BLAKE2b-256 7f0f25d0701d75d022b130fe20ed7961759083277bb5619ca45492e2afe99cdb

See more details on using hashes here.

File details

Details for the file cookietruck-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: cookietruck-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for cookietruck-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e8c1a35e6fa8e0cc38cd42aca27f9d24e1d7af906f7e4cd16ba255859e5a7413
MD5 041f195757a74c5fae30764c1ca51648
BLAKE2b-256 4df793846c9f900a3a3cdc347e53f0dbd14b858770f62a2be8edbbdba6815452

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page