Created
February 11, 2021 15:06
-
-
Save florinel-chis/b8f66682d867c1aa2058ce35aba2c62b to your computer and use it in GitHub Desktop.
python chromedriver and tor
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 import webdriver | |
chromdriver_path='/path/to/chromedriver' | |
PROXY = "socks5://localhost:9050" | |
options = webdriver.ChromeOptions() | |
options.add_argument('--proxy-server=%s' % PROXY) | |
driver = webdriver.Chrome(chrome_options=options, executable_path=chromdriver_path) | |
driver.get("http://check.torproject.org") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment