Scrapy
Scrapy plugs into helodata through its built-in HTTP_PROXY envvar support and the HttpProxyMiddleware. For per-request rotation, add scrapy-rotating-proxies.
Single static proxy
In settings.py:
HTTPPROXY_AUTH_ENCODING = "latin-1"
DOWNLOADER_MIDDLEWARES = {
"scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware": 750,
}Then in each request:
def start_requests(self):
proxy = "http://helo_s1a2b3c4d5e-type-res-region-us:PASSWORD@gate.helodata.io:7777"
for url in self.start_urls:
yield scrapy.Request(url, meta={"proxy": proxy})Or set the env vars before launching:
export HTTP_PROXY="http://helo_s1a2b3c4d5e-type-res-region-us:PASSWORD@gate.helodata.io:7777"
export HTTPS_PROXY="$HTTP_PROXY"
scrapy crawl myspiderISP rotation with scrapy-rotating-proxies
settings.py:
The middleware tracks failures per proxy and skips banned ones. Combine with RETRY_HTTP_CODES = [429, 502, 522, 524] for transient gateway errors.
Residential dynamic session rotation
You don't need an external list — generate sessions on the fly:
Adding the helodata tag
The tag shows up in your traffic analytics — see Statistics.
Verify
Common pitfalls
HttpProxyMiddlewaredisabled — Scrapy enables it by default, but customDOWNLOADER_MIDDLEWARESdicts must keep it.CONCURRENT_REQUESTS too high for a small ISP batch — your batch caps at N IPs; concurrency above N just queues. Match
CONCURRENT_REQUESTS_PER_DOMAINto your pool size.
Last updated
Was this helpful?