Skip to main content

Monkeypatch scrapy-playwright to use a custom stealth Chromium build

Project description

hamro-scrapy-playwright

Monkeypatches scrapy-playwright to use a custom stealth Chromium build.

Install

pip install hamro-scrapy-playwright

Setup

# settings.py
DOWNLOAD_HANDLERS = {
    "http": "hamro_scrapy_playwright.handler.HamroPlaywrightDownloadHandler",
    "https": "hamro_scrapy_playwright.handler.HamroPlaywrightDownloadHandler",
}
TWISTED_REACTOR = "twisted.internet.asyncioreactor.AsyncioSelectorReactor"
PLAYWRIGHT_BROWSER_TYPE = "chromium"

No manual import needed — the handler class triggers the patch and browser download automatically.

cf-autoclick Extension

A bundled Chromium extension that auto-clicks Cloudflare Turnstile challenges. It is shipped with the package — no extra downloads required.

Enable

Add this to your Scrapy settings.py:

HAMRO_CF_AUTOCLICK = True

Note: Extensions require the new headless mode. Make sure your Playwright launch options include --headless=new if running headless.

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

hamro_scrapy_playwright-0.2.0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

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

hamro_scrapy_playwright-0.2.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file hamro_scrapy_playwright-0.2.0.tar.gz.

File metadata

  • Download URL: hamro_scrapy_playwright-0.2.0.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for hamro_scrapy_playwright-0.2.0.tar.gz
Algorithm Hash digest
SHA256 51b06dab4fc6ac0337c66e53ced182bd29daaf949e21a23d2815417dd909042f
MD5 85b31166a814cc288fd2b52fc4fa2691
BLAKE2b-256 8a43ff8b12eb07195ebfadf774830aa89c29802762931040a01993859962f215

See more details on using hashes here.

File details

Details for the file hamro_scrapy_playwright-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hamro_scrapy_playwright-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b231eaf76b22b5447723d5b3eb2ca63e143eb69e0ac1c6fc7137903e7f3ce94c
MD5 c7816a6587be415d68d398e50f4b0602
BLAKE2b-256 faf13f9a9f0cf001c824841029e85b71fea1db4f9d59e07d28ff58ee117d65a9

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