> ## Documentation Index
> Fetch the complete documentation index at: https://help.decodo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scrapy Proxy Middleware Setup Guide

<Steps>
  <Step>
    Open the **Terminal** window.
  </Step>

  <Step>
    Navigate to the main directory of your project folder using `cd yourprojectname`.
  </Step>

  <Step>
    Download our proxy middleware using the following command:

    <CodeGroup>
      ```shellscript cURL theme={null}
      curl https://raw.githubusercontent.com/decodo/Scrapy-Middleware/master/decodo_auth.py > decodo_auth.py
      ```
    </CodeGroup>
  </Step>

  <Step>
    You should now see that your project folder contains the **decodo\_auth.py** file.
  </Step>

  <Step>
    Using a file manager, navigate to your project folder, where you should see the **settings.py** file.
  </Step>

  <Step>
    Edit the **settings.py** file using an editor of your choice.
  </Step>

  <Step>
    Add the following properties at the bottom:

    <CodeGroup>
      ```text Properties theme={null}
      DOWNLOADER_MIDDLEWARES = {
          'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware': 110,
          'yourprojectname.decodo_auth.ProxyMiddleware': 100,
      }

      DECODO_USER = 'username' ## Decodo Username (Sub-user)
      DECODO_PASSWORD = 'password' ## Password for your user
      DECODO_ENDPOINT = 'gate.decodo.com' ## Endpoint you'd like to use
      DECODO_PORT = '7000' ## Port of the endpoint you are using.
      ```
    </CodeGroup>

    <img src="https://mintcdn.com/decodo/7Hj3tfc-1rGMirwk/images/docs/cd46834789493a6759820c454d3209e711a6b8af411ec854ada5770d2f47731e-Group_427323124.png?fit=max&auto=format&n=7Hj3tfc-1rGMirwk&q=85&s=78495de100f6c804f3c31f74ff86784d" alt="" width="3448" height="1008" data-path="images/docs/cd46834789493a6759820c454d3209e711a6b8af411ec854ada5770d2f47731e-Group_427323124.png" />
  </Step>

  <Step>
    In the **DOWNLOADER\_MIDDLEWARES** section, change the `yourprojectname` line to the name of your project.

    <img src="https://mintcdn.com/decodo/7Hj3tfc-1rGMirwk/images/docs/c30e3a9994ad7ca781e40ae601b00e3c2925729547cfdb08a1450131c77723d8-Group_427323125.png?fit=max&auto=format&n=7Hj3tfc-1rGMirwk&q=85&s=385fe5ccaf04132356c066d88800bc1d" alt="" width="3448" height="1048" data-path="images/docs/c30e3a9994ad7ca781e40ae601b00e3c2925729547cfdb08a1450131c77723d8-Group_427323125.png" />
  </Step>

  <Step>
    Make sure that you enter your account details as well as proxy details within quotation marks **' '**.
  </Step>

  <Step>
    Finally, **Save** the file.
  </Step>
</Steps>

<Note>
  To find more information about the setup, make sure to visit our [**Github Page**](https://github.com/decodo/Scrapy-Middleware). In case you wish to use Decodo directly in your request, please refer to [**this article**](https://github.com/decodo/Scrapy).
</Note>

***

<Columns cols={2}>
  <Card title="Support" href="https://direct.lc.chat/12092754" cta="Let's chat!">
    Need help or just want to say hello? Our support is available 24/7. \
    You can also reach us anytime via email at [support@decodo.com](mailto:support@decodo.com).
  </Card>

  <Card title="Feedback" href="mailto:feedback@decodo.com" cta="Share feedback">
    Can't find what you're looking for? Request an article! \
    Have feedback? Share your thoughts on how we can improve.
  </Card>
</Columns>
