Skip to main content

A simple library to capture websites using playwright

Project description

Playwright Capture

Simple replacement for splash using playwright.

Install

pip install playwrightcapture

Usage

A very basic example:

from playwrightcapture import Capture

async with Capture() as capture:
    await capture.initialize_context()
    entries = await capture.capture_page(url, max_depth_capture_time=90)

Entries is a dictionaries that contains (if all goes well) the HAR, the screenshot, all the cookies of the session, the URL as it is in the browser at the end of the capture, and the full HTML page as rendered.

reCAPTCHA bypass

No blackmagic, it is just a reimplementation of a well known technique as implemented there, and there.

This modules will try to bypass reCAPTCHA protected websites if you install it this way:

pip install playwrightcapture[recaptcha]

This will install requests, pydub and SpeechRecognition. In order to work, pydub requires ffmpeg or libav, look at the install guide for more details. SpeechRecognition uses the Google Speech Recognition API to turn the audio file into text (I hope you appreciate the irony).

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

playwrightcapture-1.27.1.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

playwrightcapture-1.27.1-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file playwrightcapture-1.27.1.tar.gz.

File metadata

  • Download URL: playwrightcapture-1.27.1.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for playwrightcapture-1.27.1.tar.gz
Algorithm Hash digest
SHA256 96bdef5760023cf4000ef971b2a170c9ef9e8e9cbf5ba9bf4f1056caa0f536b7
MD5 c271a44c00b0be960f1a259f03d8c50e
BLAKE2b-256 ef593ac0b9eb2917df136900adfa69a62b6c9c0870bb161a48d796314e9f7a9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for playwrightcapture-1.27.1.tar.gz:

Publisher: release.yml on Lookyloo/PlaywrightCapture

Attestations:

File details

Details for the file playwrightcapture-1.27.1-py3-none-any.whl.

File metadata

File hashes

Hashes for playwrightcapture-1.27.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f892b3032bec8d5dafead2fc53b595e5bf04bd4a2afc2f8c35e9ec0243b9fc8e
MD5 4773e89223aa0f1e778c8dcde5eec519
BLAKE2b-256 2d2675da03a89d94bea9e8c29f52ae6957a5459dde70f98aae660e691a3339b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for playwrightcapture-1.27.1-py3-none-any.whl:

Publisher: release.yml on Lookyloo/PlaywrightCapture

Attestations:

Supported by

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