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.17.0.tar.gz (10.9 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.17.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: playwrightcapture-1.17.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.7 Linux/5.19.0-26-generic

File hashes

Hashes for playwrightcapture-1.17.0.tar.gz
Algorithm Hash digest
SHA256 3132e9dfe7a397025677e13c82bd7bd599082ed029db73af0074356c946c3c57
MD5 a8c0d7312b491a091ba513810ba50ff7
BLAKE2b-256 a3de74f8a6220d7d2f0ef83d0fd1450dc931ab8675893576796c719f7120c5f3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for playwrightcapture-1.17.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2d72ab27efb6a35d81f123e822299a780f4924101edc29772a5f0dd7077439a
MD5 d7465abbe69052aa8260ef95bf945604
BLAKE2b-256 995593e46c40066ebf3334e458b50814ddd426fd43c0b82b8bccdbc784f7af48

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