Scrapy Proxy Middleware

A quick guide on how to set up proxies on Scrapy Proxy Middleware.

  1. Open the Terminal window.
  2. Navigate to the main directory of your project folder using cd yourprojectname.
  3. Download our proxy middleware using the following command:
curl >

Scrapy Proxy Middleware – Download

  1. You should now see that your project folder contains the file.
  2. Using a file manager, navigate to your project folder, where you should see the file.
  3. Edit the file using an editor of your choice.

Scrapy Proxy Middleware – Edit

  1. Add the following properties at the bottom:
    'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware': 110,
    'yourprojectname.smartproxy_auth.ProxyMiddleware': 100,

SMARTPROXY_USER = 'username' ## Smartproxy Username (Sub-user)
SMARTPROXY_PASSWORD = 'password' ## Password for your user
SMARTPROXY_ENDPOINT = '' ## Endpoint you'd like to use
SMARTPROXY_PORT = '7000' ## Port of the endpoint you are using.

Scrapy Proxy Middleware – Proxy settings

  1. In the DOWNLOADER_MIDDLEWARES section, change the yourprojectname line to the name of your project.

Scrapy Proxy Middleware – Change project name

  1. Make sure that you enter your account details as well as proxy details within punctuation marks ' '.
  2. Finally, Save the file.


To find more information about the setup, make sure to visit our Github Page. In case you wish to use Smartproxy directly in your request, please refer to this article.