2021-04-27

I'm trying to use selenium using TOR: error

I am using this code to open the TOR browser tab, but the following error occurs (see below).

Follow my code. Does anyone know where I'm doing wrong. I use windows 10.

from selenium import webdriver
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
import os


torexe = os.popen(r'C:\\Users\\cielh\\Tor Browser\\Browser\\firefox.exe')
PROXY = "socks5://localhost:9050" # IP:PORT or HOST:PORT
options = webdriver.ChromeOptions()
options.add_argument('--proxy-server=%s' % PROXY)
driver = webdriver.Firefox(firefox_profile=options, executable_path=r'C:\\Users\\cielh\\OneDrive\\Área de Trabalho\\Nimo\\operadrivers\\geckodriver.exe')
driver.get("http://check.torproject.org")

The error that generates me is the one below (I tried everything already, without success!).

enter image description here



from Recent Questions - Stack Overflow https://ift.tt/32Q5nZv
https://ift.tt/eA8V8J

No comments:

Post a Comment