Skip to main content

A wrapper for scrapy-playwright with stealth features.

Project description

scrapy-playwright-stealth: Playwright integration for Scrapy with stealth features 🥷🏻

scrapy-playwright-stealth is a minimal extension of scrapy-playwright that integrates stealth features via tf-playwright-stealth.

This package simplifies the use of browser automation stealth techniques with Scrapy. It automatically applies the spoofing methods provided by tf-playwright-stealth to every page managed by scrapy-playwright.

Installation

pip install scrapy-playwright-stealth

In case you haven't installed the browsers for playwright before, you will also need to run:

playwright install

Activation

Replace the default http and/or https Download Handlers through DOWNLOAD_HANDLERS in settings.py:

# settings.py
DOWNLOAD_HANDLERS = {
    "http": "scrapy_playwright_stealth.handler.ScrapyPlaywrightStealthDownloadHandler",
    "https": "scrapy_playwright_stealth.handler.ScrapyPlaywrightStealthDownloadHandler",
}

The download handler enables the stealth features by default. You can pass PLAYWRIGHT_USE_STEALTH=False in settings.py to deactivate it. In this case the package will behave exactly as scrapy-playwright behaves.

Usage

Refer to the scrapy-playwright documentation.

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

scrapy_playwright_stealth-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

scrapy_playwright_stealth-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file scrapy_playwright_stealth-0.1.0.tar.gz.

File metadata

File hashes

Hashes for scrapy_playwright_stealth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eb07b5a950dfd6590f865a7fbfa60f0260ff9c6d0164477fd9b20f9441bbf096
MD5 96b9dee0f7f66f6f9a4ade0ff92fee26
BLAKE2b-256 6b0a61afa47b325dbcbb9fbfd89adfd7397f1bfb4a2b227728a6b249b12ac968

See more details on using hashes here.

File details

Details for the file scrapy_playwright_stealth-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for scrapy_playwright_stealth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7a70ccca80461d6c26f35dd2ccdec34b7755ce7cb9037815570e0f1244302ea
MD5 a1ddbf581a472dcf38d638dd7923fa27
BLAKE2b-256 779ce2ad05c3694693b5c259b77506937aea82ba37334c6bdd9d628322968107

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