Skip to content

Instantly share code, notes, and snippets.

@yasinkuyu
Created September 8, 2017 14:07
Show Gist options
  • Save yasinkuyu/eea292dbd848a6246391535e35a7548b to your computer and use it in GitHub Desktop.
Save yasinkuyu/eea292dbd848a6246391535e35a7548b to your computer and use it in GitHub Desktop.
Python Selenium Luminati Proxy Desired Capabilities (Exclude localhost)
#@yasinkuyu 08/09/2017
# install luminati (https://luminati.io) proxy manager & run
from selenium import webdriver
from selenium.webdriver.common.proxy import Proxy, ProxyType
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.proxy import *
PROXY = '127.0.0.1:24000'
proxy = Proxy()
proxy.http_proxy = PROXY
proxy.ftp_proxy = PROXY
proxy.sslProxy = PROXY
proxy.no_proxy = "localhost" #etc... ;)
proxy.proxy_type = ProxyType.MANUAL
#limunati customer info
proxy.socksUsername = 'lum-customer-XXXX-zone-XXXX'
proxy.socksPassword = "XXXX"
capabilities = webdriver.DesiredCapabilities.CHROME
proxy.add_to_capabilities(capabilities)
driver = webdriver.Chrome(desired_capabilities=capabilities)
driver.get("http://ipadresimnedir.com")
@gunslinger
Copy link

so we dont need to use Options on from selenium.webdriver.chrome.options import Options ?

@dhnesh
Copy link

dhnesh commented Mar 6, 2019

Its Not Working chromedriver is showing this error ----------> checking the proxy and the firewall

@gerimo
Copy link

gerimo commented Mar 17, 2019

What Chromedriver and selenium version does this requiere?

@aijogja
Copy link

aijogja commented Jan 6, 2020

Its Not Working chromedriver is showing this error ----------> checking the proxy and the firewall

I think you should use luminati super proxy for this value.
change PROXY = '127.0.0.1:24000' to PROXY = 'zproxy.lum-superproxy.io:22225'

@marcelogrsp
Copy link

it is asking username and password ;/

@UnderZer0z
Copy link

same... it is asking username and password...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment