You can do this through the code below here :
1 - Create a new file called middlewares.py and save it in your scrapy project and add the following code to it.
2 - Open the project configuration file (./project_name/settings.py) and add the following code
DOWNLOADER_MIDDLEWARES = { 'scrapy.contrib.downloadermiddleware.httpproxy.HttpProxyMiddleware': 110, 'project_name.middlewares.ProxyMiddleware': 100, }
Alternatively, you can use multiple proxies with scrapy . Additional information can here .
source share