title: how to set proxy with authentication in selenium chromedriver python?
body: <p>I am creating a script that crawls one website to gather some data but the problem is that they blocked me after too many requests but using a proxy I can send more request then currently I do. I have integrated proxy with chrome option <code>--proxy-server</code></p>
  
  <p><code>options.add_argument('--proxy-server={}'.format('http://ip:port'))</code></p>
  
  <p>but I am using a paid proxy so it requires authentication and as below screenshot it gives the alert box for username and password</p>
  
  <p><a href="https://i.stack.imgur.com/H98a4.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/H98a4.jpg" alt="selenium proxy authentication alert box"></a>
  Then I tried to use it with username and password</p>
  
  <p><code>options.add_argument('--proxy-server={}'.format('http://username:password@ip:port'))</code></p>
  
  <p>But it also does not seems to work. I was looking for a solution and found below solution and I used it with the chrome extension <a href="https://www.crx4chrome.com/crx/1446/" rel="noreferrer">proxy auto auth</a> and without the chrome extension</p>
  
  <pre><code>proxy = {'address': settings.PROXY,
               'username': settings.PROXY_USER,
               'password': settings.PROXY_PASSWORD}
  
  capabilities = dict(DesiredCapabilities.CHROME)
  capabilities['proxy'] = {'proxyType': 'MANUAL',
                               'httpProxy': proxy['address'],
                               'ftpProxy': proxy['address'],
                               'sslProxy': proxy['address'],
                               'noProxy': '',
                               'class': "org.openqa.selenium.Proxy",
                               'autodetect': False,
                               'socksUsername': proxy['username'],
                               'socksPassword': proxy['password']}
  options.add_extension(os.path.join(settings.DIR, "extension_2_0.crx")) # proxy auth extension
  </code></pre>
  
  <p>but neither of above worked properly it seems working because after above code the proxy authentication alert disappeared and when I checked my IP by googling what is my IP and confirmed that is not working.</p>
  
  <p>please anyone who can help me to authenticate the proxy server on chromedriver.</p>