title: Python selenium PhantomJS proxy
body: <p>This is my code:</p>
  
  <pre><code>from selenium import webdriver
  
  proxylist=['58.12.12.12:80','69.12.12.12:80']
  weblist=['https://www.google.com','https://www.facebook.com','https://www.yahoo.com','https://aol.com']
  for s in range (len(proxylist)):
      service_args = ['--proxy=%s'%(proxylist[s]),'--proxy-type=socks5']
      driver = webdriver.PhantomJS('phantomjs.exe', service_args = service_args)
      for s in weblist:
          driver.get(s)
  </code></pre>
  
  <p>The idea is the browser first will use proxylist[0] to go to those sites. If proxylist[0] is timeout at website[2] then proxylist[1] will continue to do the job with website[3]. I think i should use try and except but a don't know where to put them. Glad you helped!</p>