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.prepare_context()
    entries = await capture.capture_page(url)

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.19.4.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

playwrightcapture-1.19.4-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: playwrightcapture-1.19.4.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.7 Linux/5.19.0-38-generic

File hashes

Hashes for playwrightcapture-1.19.4.tar.gz
Algorithm Hash digest
SHA256 e4ff92014a26ad715e42bf5116ec06ecbe58d37b723ba4337f7a765177ff0d02
MD5 854339c5d0cf0c6daf9419de8f25beb5
BLAKE2b-256 bc156c09f4cd7cb57caebaba39507ef072c217a878ee8e9ff56aebdf5a1ee620

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwrightcapture-1.19.4-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.7 Linux/5.19.0-38-generic

File hashes

Hashes for playwrightcapture-1.19.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5d673b691c6f74497a3705d53338ef965ab93b7967bff697597b3759225875a7
MD5 77abd26bd4ced975a22a3f8b1ae00640
BLAKE2b-256 68dfa8b09d9a8adcddcc2730ca3d69b60d7470613976fcb4e5d9bfe1c18e0bf7

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