For some context, I'm using Google Collab to try to make a webscraper, and for that I want to use selenium. But I can't seem to set up the web driver properly. Google uses Ubuntu servers I believe.
This is my first time trying to selenium so I'm not sure what I'm looking for or doing wrong.
Here is the installation of selenium and geckodriver.
!pip install selenium
!wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
!tar -xvzf geckodriver*
!chmod +x geckodriver
!sudo mv geckodriver /usr/local/bin/
Here is the code I'm attempting to run
driver = webdriver.Firefox()
driver.get(product_link)
driver.implicitly_wait(5)
Here is the error I'm getting.
WebDriverException Traceback (most recent call last)
<ipython-input-11-ef677185e35a> in <cell line: 4>()
2 product_link = base_url + links[0]
3
----> 4 driver = webdriver.Firefox()
5 driver.get(product_link)
6 driver.implicitly_wait(5)
2 frames
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/common/service.py in assert_process_still_running(self)
108 return_code = self.process.poll()
109 if return_code:
--> 110 raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}")
111
112 def is_connectable(self) -> bool:
WebDriverException: Message: Service /usr/local/bin/geckodriver unexpectedly exited. Status code was: 1
What is status code 1 mean? The only other result I could find for the status 1 error was a reddit that's been private.