



I finally solved my problem (tested on a VM with Ubuntu 20.04 to be able to install selenium4). I've made my example script as simple as possible but I've tested a lot of things in the last 2 days and found nothing relevant. : Message: Reached error page: about:neterror?e=prox圜onnectFailure&u= is configured to use a proxy server that is refusing connections. The script is not blocking anymore and TorBrowser tries to contact but the TorBrowser never connects to the tor network, resulting in the following error : If I replace binary = FirefoxBinary("tor-browser_en-US/Browser/start-tor-browser")īy binary = FirefoxBinary("tor-browser_en-US/Browser/firefox") The output of the script prints 0, never prints 1 and the TorBrowser never tries to connect to My script gets blocked once I try to instanciate the webdriver. t_preference('_port', 9050)īinary = FirefoxBinary("tor-browser_en-US/Browser/start-tor-browser")ĭriver = webdriver.Firefox(options=options, firefox_binary=binary) Profile = FirefoxProfile("tor-browser_en-US/Browser/TorBrowser/Data/Browser/fault")

I'm trying to do the things step by step so, in this test, I'm using a freshly new TorBrowser archive without the personalized profile : #!/usr/bin/pythonįrom _binary import FirefoxBinaryįrom import Options as FirefoxOptionsįrom _profile import FirefoxProfile Here is the code I used to try and launch TorBrowser through Selenium. User_pref("_port", ChangeToTheDesiredPort2) I know it's possible to run multiple TorBrowser instances (without selenium) by specifying the ports we want to use in each TorBrowser bundle by adding this lines to Browser/TorBrowser/Data/Browser/fault/user.js : user_pref("_port", ChangeToTheDesiredPort1) I'd like to use TorBrowser to be able to run multiple instances using different tor exit relay. I've been able to use the tor network through selenium using the tor daemon and a firefox instance. I'd like to run TorBrowser through selenium.
