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.
Results
From bot.sannysoft.com
| Headless | Headful | |
|---|---|---|
| Stealth | ||
| No Stealth |
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scrapy_playwright_stealth-0.1.1.tar.gz.
File metadata
- Download URL: scrapy_playwright_stealth-0.1.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1ae5b364f7c733b75aed6e39428ea6d7924f0ff673cd8f667504f53e6f0de3d
|
|
| MD5 |
725819944fccbfaed69d158fa263ea46
|
|
| BLAKE2b-256 |
e1b619960db6342048240a8fbd782253348727340ec6d31f1f01f59b438f7ec8
|
File details
Details for the file scrapy_playwright_stealth-0.1.1-py3-none-any.whl.
File metadata
- Download URL: scrapy_playwright_stealth-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5153935b8d0ef7a544867fe7675e2f5456a24fc2e885070b02ebbeb4576c416
|
|
| MD5 |
a509ae7190bd4772e7f2d133ab187f5f
|
|
| BLAKE2b-256 |
221ee9b73013d7f017edd959ad6d87660d49ae5c4c94d1a8d005b07caad28fe7
|