Created
October 27, 2019 15:14
-
-
Save a12b/3767043f1bfbc83874a6afcfd444df86 to your computer and use it in GitHub Desktop.
Selenium Fake IP Address with Tor Network
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
#Install Tor Browser, open Tor Browser, run selenium with Chrome Browser and Tor Exit Node. | |
CHROME_GOOGLE = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' | |
chrome_options = webdriver.ChromeOptions() | |
chrome_options.binary_location = CHROME_GOOGLE | |
chrome_options.add_argument('--proxy-server=socks5://127.0.0.1:9150') | |
driver = webdriver.Chrome(DRIVER_PATH, chrome_options=chrome_options) | |
driver.get('https://check.torproject.org/') |
driver = webdriver.Firefox(executable_path=r'/home/nafanz/Документы/git/github/Notes/home/selenium/geckodriver', firefox_options=options)
I think executable_path must be the location of firefox, not the driver
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
*Sorry. You are not using Tor. *
Can you please tell me where is the error?