Configure Scrapy for Proxidize
Scrapy can apply an authenticated Proxidize proxy to each request through request metadata. This leaves crawling, deduplication, parsing, exports, rotation policy, and target-aware pacing as separate concerns.
Keep the endpoint and credentials in environment variables. Use the exact HTTP or HTTPS scheme shown in the Proxidize dashboard.
Run the Integration
Install the pinned Scrapy release. Start with retries disabled while validating the route so one configuration error does not become a burst of repeated requests.
Request-level proxy
Build the URL from encoded environment variables, then set it on the request that should use Proxidize.
Control Sessions and Rotation
Assign the same sticky session to requests that share application state. Keep retry middleware from silently changing identity during a stateful flow, and cap concurrent requests independently from the proxy connection limit.
Use a sticky session when related requests must keep the same temporary network identity. Use rotation for independent requests, and rotate only at an intentional workflow boundary. Cookies, browser storage, and application state should change with the proxy identity rather than halfway through a stateful task.
Verify the Proxied Network Path
Run the IP-check example through the same client or browser context that will perform the permitted workload. A successful request from another terminal or library does not prove that this integration uses the same proxy route.
The repository example prints a redacted endpoint and the visible exit IP. It does not print the username or password. Confirm the intended US mobile or residential profile before using an approved target.
Troubleshoot Common Failures
- Confirm HttpProxyMiddleware is enabled when custom project settings override downloader middleware.
- Redact the authenticated proxy URL from downloader exceptions and debug logs.
- Use async start() on current Scrapy releases; retain start_requests() only when supporting older projects deliberately.
Test in layers: first verify the endpoint and credentials, then the IP-check URL, and only then the intended destination. Keep TLS verification enabled and treat repeated timeouts separately from authentication failures.
Production Checklist
- Keep credentials in environment variables or a secrets manager.
- Match one sticky session to one stateful worker or browser context.
- Bound concurrency, retries, queue length, and request rate.
- Redact proxy credentials from exceptions, traces, and logs.
- Verify the exit location and protocol before scaling.
- Follow applicable laws, third-party terms, and destination rules.