title: How can I pretend to be in a certain country during web scraping?
body: <p>I want to scrape a website, but it should look like I am from a specific (let's say USA for this example) country (to make sure that my results are valid). </p>
  
  <p>I am working in Python (Scrapy). And for scraping, I am using the rotating user agents (see: <a href="https://pypi.org/project/scrapy-fake-useragent-fix/" rel="nofollow noreferrer">https://pypi.org/project/scrapy-fake-useragent-fix/</a>).</p>
  
  <p>The user agents are what I need to scrape. But can I use this, in combination with the request to pretend that I am in a specific country? </p>
  
  <p>If there are some possibilities (in scrapy, Python) please let me know. Appreciated! </p>
  
  <p><strong>Example how I used the User Agents in my script</strong></p>
  
  <pre><code>DOWNLOADER_MIDDLEWARES = {
  'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware': None,
  'scrapy_fake_useragent.middleware.RandomUserAgentMiddleware': 400,
  }
  </code></pre>