Skip to content

Instantly share code, notes, and snippets.

@liquidgenius
Forked from yasinkuyu/desiredcapabilities.py
Created June 28, 2018 03:37
Show Gist options
  • Save liquidgenius/37245dd11c767af0066f5fdd2763b3e9 to your computer and use it in GitHub Desktop.
Save liquidgenius/37245dd11c767af0066f5fdd2763b3e9 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")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment