Created
November 27, 2017 09:55
-
-
Save ep4sh/c1d1bbc6fc1108232160b33f7fb62535 to your computer and use it in GitHub Desktop.
Python+SELENIUM+TOR
This file contains hidden or 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 import webdriver | |
| service_args = [ '--proxy=localhost:9150', '--proxy-type=socks5', ] | |
| driver = webdriver.PhantomJS(executable_path='<path to PhantomJS>', service_args=service_args) | |
| driver.get("http://icanhazip.com") | |
| print(driver.page_source) | |
| driver.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment