Created
October 30, 2021 22:56
-
-
Save ShlomiRex/1d9d7b7b341d8af535b53c657309fcad to your computer and use it in GitHub Desktop.
Python Selenium - Brave + 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
_brave_path = r'C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe' | |
def get_brave_tor_driver(): | |
option = webdriver.ChromeOptions() | |
option.binary_location = _brave_path | |
option.add_argument("--tor") # Launch in Tor mode | |
driver = webdriver.Chrome(executable_path=_chrome_driver_path, chrome_options=option) | |
return driver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It should open 1 window only in Tor mode. Didn't encountered this issue before.