Scrapy proxy setup
Python crawling framework with its own downloader middleware stack. Point it at the Eveses residential pool with the configuration below — the geo lives in the username, so nothing else in your setup has to change to move country.
proxy.eveses.com:12321 · SOCKS5 on 32325 · 199 countries · from $7.35/GB
Scrapy will not pick the proxy up from `http_proxy` for HTTPS targets. It has to go through `HttpProxyMiddleware`, and the credentials must be set on the request rather than in the URL — a proxy URL with a password in it is silently stripped from `meta["proxy"]`.
Configuration
# settings.py
DOWNLOADER_MIDDLEWARES = {
"scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware": 110,
"myproject.middlewares.EvesesProxyMiddleware": 100, # must run BEFORE 110
}
# middlewares.py
import base64
class EvesesProxyMiddleware:
USER = "eveses_user_country-us" # add geo tokens to the username
PASS = "YOUR_PROXY_PASSWORD"
def process_request(self, request, spider):
request.meta["proxy"] = "http://proxy.eveses.com:12321"
creds = base64.b64encode(f"{self.USER}:{self.PASS}".encode()).decode()
request.headers["Proxy-Authorization"] = f"Basic {creds}"Notes for Scrapy
Give the middleware a lower number than HttpProxyMiddleware (110) so it sets `meta["proxy"]` first.
Rotate per request by appending a fresh `_session-…` token to the username inside `process_request`.
Leave `RETRY_TIMES` at its default; a blocked exit IP retries onto a different one automatically.
Change country without touching Scrapy
eveses_user_country-deeveses_user_country-de_session-ab12cd34_lifetime-30mThe geo and the session live in the username, not in the host or the port. Every configuration on this page stays exactly as it is when you move country — you edit one string. 199 countries are addressable, with city and state tokens inside most of them.
FAQ
How do I set a proxy in Scrapy?›
How do I choose the country Scrapy exits from?›
How do I keep the same IP across requests in Scrapy?›
What does this cost?›
Other integrations
Run Scrapy through residential IPs
$7.35/GB at 1 GB, $2.57/GB in volume — same credentials in every tool.
Get proxies →