Closed SquirrelAssassin closed 6 years ago
Since the time I wrote this code and last pushed to this repo (over 2 years ago!), Mozilla has created a new proxy to help WebDriver clients (like Selenium) interact with Firefox. This proxy is called geckodriver
and you need to install it and add the executable's location to your system path before you can use this code.
You can find geckodriver
here: https://github.com/mozilla/geckodriver/releases
These StackOverflow threads should help you with installing geckodriver
and updating your system path:
how to install geckodriver on a windows system
Selenium using Python - Geckodriver executable needs to be in PATH
As a sidenote, this code is really old! I might try to update it now that my attention has been brought back to it. For now, I would not assume it works.
Actually on a further look, I don't think this will work on Windows. It wasn't really written with cross-platform compatibility in mind. I'll try to fix that also.
That will explain it, I will try it later on linux. Thanks!
Cool, I have made a branch called 2017-refresh
which I have been updating. It can now do web searches and mobile searches. (I am working on offers and quizzes at the moment).
It should have compatibility issues with Windows resolved. Perhaps you can try it out and let me know?
Did the pip install and get the folloing:
Traceback (most recent call last): File ".\bing.py", line 80, in
driver = webdriver.Firefox()
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 144, in init
self.service.start()
File "C:\Python27\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.