Skip to main content
Scrapy is a Python web scraping framework. This guide shows how to configure it to use Stat Proxies via a custom downloader middleware.

Middleware setup

Create a proxy middleware in your Scrapy project:

Configure settings

Add your proxy credentials and enable the middleware in settings.py:

Rotating through multiple proxies

To distribute requests across multiple proxies, modify the middleware:

Verifying it works

Add a quick spider to confirm your proxy is active:
Run it:
The logged IP should be your proxy IP, not your real one.
Make sure to replace the example credentials with your actual proxy details from the Stat Proxies dashboard.

Python Requests Library

Simpler Python proxy usage with requests

Blocked Requests

How to handle blocks and improve success rates