![]() 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |