Skip to main content

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.

Results

From bot.sannysoft.com

Headless Headful
Stealth Headless Headful
No Stealth Headless Headful

Metadata

Release files for scrapy-playwright-stealth 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scrapy-playwright-stealth 0.1.1
File Size Uploaded
scrapy_playwright_stealth-0.1.1.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scrapy-playwright-stealth 0.1.1
File Interpreter ABI Platform
scrapy_playwright_stealth-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.0 kB

Release files / scrapy_playwright_stealth-0.1.1.tar.gz

Download URL scrapy_playwright_stealth-0.1.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b1ae5b364f7c733b75aed6e39428ea6d7924f0ff673cd8f667504f53e6f0de3d
BLAKE2b-256 checksum
How to use checksums
e1b619960db6342048240a8fbd782253348727340ec6d31f1f01f59b438f7ec8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / scrapy_playwright_stealth-0.1.1-py3-none-any.whl

Download URL scrapy_playwright_stealth-0.1.1-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5153935b8d0ef7a544867fe7675e2f5456a24fc2e885070b02ebbeb4576c416
BLAKE2b-256 checksum
How to use checksums
221ee9b73013d7f017edd959ad6d87660d49ae5c4c94d1a8d005b07caad28fe7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page