Forked from ijharulislam/gist:4b9b7209970cea9e87111384ce77deb7
Created
September 16, 2017 15:12
-
-
Save shafayeatsumit/83eca931ab7ff883c2f330b7aaae362e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium.webdriver.common.proxy import * | |
from selenium import webdriver | |
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities | |
proxy = {'address': '191.101.24.45:8085'} | |
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} | |
driver = webdriver.Remote(command_executor='http://127.0.0.1:4444/wd/hub', desired_capabilities=capabilities) | |
print("Fetching Data...") | |
driver.get("http://www.whatismyip.com/") | |
driver.save_screenshot('ss.png') | |
driver.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment