Metadata-Version: 2.4
Name: hamro-scrapy-playwright
Version: 0.2.0
Summary: Monkeypatch scrapy-playwright to use a custom stealth Chromium build
License: MIT
Project-URL: Homepage, https://github.com/jyabadesk/hamro-scrapy-playwright
Project-URL: Repository, https://github.com/jyabadesk/hamro-scrapy-playwright
Keywords: scrapy,playwright,chromium,anti-bot,stealth
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Scrapy
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.25
Requires-Dist: scrapy>=2.10
Requires-Dist: scrapy-playwright>=0.0.40
Requires-Dist: playwright>=1.35
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"
Dynamic: license-file

# hamro-scrapy-playwright

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

## Install

```bash
pip install hamro-scrapy-playwright
```

## Setup

```python
# 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`:

```python
HAMRO_CF_AUTOCLICK = True
```

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