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.8.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.

playwrightcapture-1.19.8-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for playwrightcapture-1.19.8.tar.gz
Algorithm Hash digest
SHA256 8e958184a06a8e231a889cbaa66e9f4ce18b2aefa5b49fd0c901805d0ad68e1b
MD5 84a184fde1e296fa6e04c4943f907b57
BLAKE2b-256 99afecd0bd75e8167cf9b43f8dea3a04e0c8494d4c95941998d7f7899d5ac9ed

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for playwrightcapture-1.19.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f0086bbca8a976b000d7fd6de6c775a6e70b73efe3ca700b816a28ebafe60520
MD5 a8df4c0943b68abba86560c35e8f7104
BLAKE2b-256 c393d10a4dbf84ff784307980ad6326dcf29182f7fab0034dbbed99f8c3b1460

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