scrapy-impersonate
Scrapy download handler that can impersonate browser fingerprints
What it is and what it does
scrapy-impersonate is a Scrapy download handler that integrates curl-cffi to perform HTTP requests with spoofed browser fingerprints. Instead of Scrapy's default HTTP client, it routes requests through curl-cffi, which can mimic the TLS signatures and JA3 fingerprints of real browsers—Chrome, Firefox, Safari, and Edge across multiple versions and platforms. This allows web scrapers to bypass basic fingerprint-based bot detection that rejects requests from non-browser clients.
The package works by replacing Scrapy's standard download handlers and providing a middleware that can randomly rotate between supported browser profiles on a per-request basis. You configure it via Scrapy settings, then tag individual requests with an `impersonate` meta key to specify which browser to emulate. The asyncio-based Twisted reactor is required for proper async execution. It's designed for developers who need to scrape sites with fingerprint-based anti-bot protections but want to stay within the Scrapy framework rather than switching to a different HTTP client entirely.
Use it for:
- Scrape sites that reject requests with non-browser TLS signatures by impersonating Chrome, Firefox, or Safari.
- Rotate browser fingerprints across requests to avoid detection patterns based on consistent client profiles.
- Test web applications' anti-bot defenses by simulating requests from different browser versions and platforms.
- Extract data from sites protected by basic JA3 fingerprint checks without rewriting scraper logic outside Scrapy.
- Combine browser impersonation with Scrapy's middleware and pipeline ecosystem for complex scraping workflows.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Scrapy download handler that replaces HTTP/HTTPS requests with curl-cffi to impersonate browser TLS signatures and JA3 fingerprints, allowing scraping of sites that detect and block non-browser clients.
Yes, if you need Scrapy-based scraping against sites with fingerprint-based bot detection. The package is actively maintained, has low install friction, carries a permissive MIT license, and integrates cleanly into Scrapy's architecture. No security vulnerabilities are known. The main gotcha is the requirement for Python 3.10+ and explicit asyncio reactor configuration—verify that your Scrapy version and environment support this before committing.
Install
scrapy-impersonate on PyPI
pip
pip install scrapy-impersonateuv
uv add scrapy-impersonatepoetry
poetry add scrapy-impersonateInstalling scrapy-impersonate
Before you install
Low friction: pure Python wheel with only two runtime dependencies (curl-cffi and scrapy). Actively maintained with a recent release (88 days ago) and steady repository activity.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
pip install scrapy-impersonate
# In settings.py or custom_settings:
DOWNLOAD_HANDLERS = {
"http": "scrapy_impersonate.ImpersonateDownloadHandler",
"https": "scrapy_impersonate.ImpersonateDownloadHandler",
}
TWISTED_REACTOR = "twisted.internet.asyncioreactor.AsyncioSelectorReactor"
USER_AGENT = ""
# In spider:
yield scrapy.Request(
url,
meta={"impersonate": "chrome133a"},
)
Requires Python 3.10 or later and the asyncio-based Twisted reactor to be explicitly configured in Scrapy settings.
Verify before relying
- Whether curl-cffi's browser impersonation reliably defeats modern anti-bot systems beyond basic TLS/JA3 detection.
- Performance overhead compared to standard Scrapy HTTP requests.
- Compatibility with Scrapy middleware and request/response pipelines when using the custom download handler.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — curl-cffi, scrapy |
| Maintenance | actively maintained — 88 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 132,327/month — #11,556 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: scrapy_impersonate-1.7.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
curl-cfficurl_cffi provides Python bindings to libcurl…
permissive · top 1,000 on PyPI
primpHTTP client library that mimics real web…
permissive · top 5,000 on PyPI
rnetAn HTTP client library with browser…
copyleft · top 15,000 on PyPI
scrapy-playwrightIntegrates Playwright browser automation into…
permissive · top 5,000 on PyPI
browserforgeGenerates realistic browser headers and device…
permissive · top 5,000 on PyPI
browser-cookie3Extracts cookies from your browser's local…
copyleft · top 5,000 on PyPI
fake-headersGenerates realistic User-Agent strings and HTTP…
permissive · top 15,000 on PyPI
django-impersonateAllows Django superusers to temporarily assume…
permissive · top 15,000 on PyPI
wafer-pyAn anti-detection HTTP client that handles TLS…
permissive · top 15,000 on PyPI
tls-clientAn HTTP client library that mimics the requests…
permissive · top 5,000 on PyPI