title: Rotate server IPs using selenium (Python)
body: <p>I'm working on a project where i need to scrap some data using selenium.. For scrapping, i want to rotate my server IPs (my server has multiple IPs attached to single machine). For each request, i want to use a different IP so i don't get blocked. Not sure how this could be done. I'm using Firefox on ubuntu 16.04.   </p>
  
  <p>So far, by googling for many hours, i have found this but its not working. </p>
  
  <pre><code>profile = webdriver.FirefoxProfile()
  profile.set_preference("network.proxy.type", 1)
  profile.set_preference("network.proxy.http", 'my-ip')
  profile.set_preference("network.proxy.http_port", 80)
  profile.set_preference("network.proxy.https", 'my-ip')
  profile.set_preference("network.proxy.https_port", 80)
  profile.update_preferences()
  driver = webdriver.Firefox(firefox_profile=profile)
  driver.get('https://api.ipify.org/')
  print driver.page_source
  </code></pre>
  
  <p>I'm testing with <a href="https://api.ipify.org/" rel="nofollow noreferrer">https://api.ipify.org/</a> just to find which IP is used for the generated request but it always shows me the primary IP of my server even though i have set different IP using the above code.</p>
  
  <p>Any help/guidance or workaround would be highly appreciated.</p>