
TorBrowserDriver does not download Tor Browser Bundle (TBB) for you. import mon as cm from tbselenium.tbdriver import TorBrowserDriver from tbselenium.utils import launch_tbb_tor_with_stem tbb_dir = "/path/to/TorBrowserBundle/" tor_process = launch_tbb_tor_with_stem ( tbb_path = tbb_dir ) with TorBrowserDriver ( tbb_dir, tor_cfg = cm.

It will not use the tor installed on your system. The following will start a new tor process using Stem. get ( '' ) Using with Stemįirst, make sure you have Stem installed ( pip install stem). from tbselenium.tbdriver import TorBrowserDriver with TorBrowserDriver ( "/path/to/TorBrowserBundle/" ) as driver : driver. Tor needs to be installed ( apt install tor) and running on port 9050.

Make sure you install version v0.23.0 version or newer older versions may not be compatible with the current Tor Browser series. Install geckodriver from the geckodriver releases page.

A Python library to automate Tor Browser with Selenium.
