Skip to content

Instantly share code, notes, and snippets.

@florinel-chis
Created February 11, 2021 15:06
Show Gist options
  • Save florinel-chis/b8f66682d867c1aa2058ce35aba2c62b to your computer and use it in GitHub Desktop.
Save florinel-chis/b8f66682d867c1aa2058ce35aba2c62b to your computer and use it in GitHub Desktop.
python chromedriver and tor
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