Coder Social home page Coder Social logo

Comments (14)

toolonely avatar toolonely commented on August 17, 2024 1

You should download Tor browser yourself, extract it and pass the path of the extracted folder (not the binary) in the tbb_path variable. https://github.com/webfp/tor-browser-selenium#-usage

I think this shall be explicitly mentioned in the README. After all, the "getting started" workflow of a new user consists in trying the example listed in the README. By copypasting it. And it won't work. Because "/path/to/tor-browser/" is a generic name, because locations are OS specific. Even better to improve the path of the extracted folder (not the binary) by replacing it with the path of the extracted folder (not the binary), as in the path that contains the Browser/ directory and the start-tor-browser.desktop file. On my Linux, Tor Browser is started by a distro specific tor-browser shell script, which populates ~/.tor-browser/INSTALL with content similar to what's in the official binary Tor Browser tarball (which I had to download and extract to find that out, as you suggested, so this is an additional, sometimes unnecessary step, if the example in the README can be made a little bit more explicit, as suggested).

It is also worth mentioning in the said example in the README that absolute paths have to be used. So "/home/user/.tor-browser/INSTALL/" (see above) will work, while "~/.tor-browser/INSTALL/" will fail with

tbselenium.exceptions.TBDriverPathError: TBB path is not a directory ~/.tor-browser/INSTALL/

from tor-browser-selenium.

gunesacar avatar gunesacar commented on August 17, 2024

Thanks for reporting. You don't have to provide a binary unless you need to use modified browser.
Can you tell more about the use case or share minimal code to reproduce?

from tor-browser-selenium.

AndrewGalak6578 avatar AndrewGalak6578 commented on August 17, 2024

Well, if I don't provide then I get error (tbselenium.exceptions.TBDriverPathError: Either TBB path or Firefox profile and binary path should be provid).

Here's a little part from code

import requests
import time
import tbselenium
from tbselenium.tbdriver import TorBrowserDriver
from selenium.webdriver.common.by import By
with TorBrowserDriver() as driver:#
print("Opening the webpage...")
driver.get("onion website")

from tor-browser-selenium.

AndrewGalak6578 avatar AndrewGalak6578 commented on August 17, 2024

How can I just open browser, if it always asks me to give it the path, but when i give it says that this is not correct path

from tor-browser-selenium.

gunesacar avatar gunesacar commented on August 17, 2024

You should download Tor browser yourself, extract it and pass the path of the extracted folder (not the binary) in the tbb_path variable. https://github.com/webfp/tor-browser-selenium#-usage

from tor-browser-selenium.

AndrewGalak6578 avatar AndrewGalak6578 commented on August 17, 2024

You should download Tor browser yourself, extract it and pass the path of the extracted folder (not the binary) in the tbb_path variable. https://github.com/webfp/tor-browser-selenium#-usage

I did it, but as I said, it gives me error "tbselenium.exceptions.TBDriverPathError: Invalid Firefox binary /Applications/Tor Browser.app/Browser/firefox" with code - tbb_path="/Applications/Tor Browser.app"
with TorBrowserDriver(tbb_path=tbb_path) as driver:

I don't know why it tries to add Browser/firefox but firefox is placed under Tor Browser.app/Contents/MacOS/firefox. And I use the latest version.

from tor-browser-selenium.

gunesacar avatar gunesacar commented on August 17, 2024

Unfortunately MacOS is not currently supported.

from tor-browser-selenium.

AndrewGalak6578 avatar AndrewGalak6578 commented on August 17, 2024

Unfortunately MacOS is not currently supported.

It's alright, but what system is supported?

from tor-browser-selenium.

gunesacar avatar gunesacar commented on August 17, 2024

https://github.com/webfp/tor-browser-selenium#%EF%B8%8F-compatibility

from tor-browser-selenium.

gunesacar avatar gunesacar commented on August 17, 2024

Good suggestions, @toolonely . I'm reopening this issue to track it.

tbselenium.exceptions.TBDriverPathError: TBB path is not a directory ~/.tor-browser/INSTALL/

We can also use os.path.expandpath to convert relative paths to absolute.

from tor-browser-selenium.

gunesacar avatar gunesacar commented on August 17, 2024

Added a clarification to https://github.com/webfp/tor-browser-selenium#-usage.

from tor-browser-selenium.

gunesacar avatar gunesacar commented on August 17, 2024

PRs to improve the installation instructions in the README are welcome.

from tor-browser-selenium.

toolonely avatar toolonely commented on August 17, 2024

README is much better now, just needs s/not pass pass/not pass/.

from tor-browser-selenium.

gunesacar avatar gunesacar commented on August 17, 2024

README is much better now, just needs s/not pass pass/not pass/.

Thanks for the heads up. Fixed: 2f5cbba

from tor-browser-selenium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.