killosquad.blogg.se

How to open tor browser
How to open tor browser






how to open tor browser

I think you should add some time pauses between commands: import timeĪnother way to open Tor: os.system('"C:\\Users\\My Name\\Desktop\\Tor Browser\\Browser\\firefox.exe"' )īut this time your command will wait until the called process stops himself (may be user will close it). Service_args = ĭriver = webdriver.PhantomJS(service_args=service_args) Sproc=subprocess.Popen('"C:\\Users\\My name\\Desktop\\Tor Browser\\Browser\\firefox.exe"' ) This worked for me: from selenium import webdriver Or os.close('/Applications/TorBrowser.app') #TypeError: an integer is required (got type str) Or os.system("kill /Applications/TorBrowser.app") #sh: line 0: kill: /Applications/TorBrowser.app: arguments must be process or job IDs Those include: os.system("taskkill /im /Applications/TorBrowser.app /f") #sh: taskkill: command not found The main problem is to close the browser afterwards, as none of the commands found in other posts worked. However, the following line worked: os.system('open /Applications/TorBrowser.app') Or os.system('start /Applications/TorBrowser.app') #sh: start: command not found Subprocess.Popen('/Applications/TorBrowser.app') #permission denied To open the browser, some other options I found out there are not working. Os.system('open /Applications/TorBrowser.app') This is why I am trying now to automatise the complete process that is: open Tor browser automatically, run some script and at the end close the browser automatically. However, I need that the Tor browser is opened for the script to work. I managed to make it work with both requests and Selenium + PhantomJS. I am playing around with web scraping and Tor.








How to open tor browser