I am new to the forum but have searched the posts for something to fix my problem.
Here are the posts I've used to attempt troubleshooting: #1 #2 ~And other Google results.
I switched to Linux Mint from Windows and I am having trouble getting set up. I am also new to Python/programming in general, so bear with me.
Linux Mint comes with Python2 installed but I have done all of my practice with Python3, so I have installed Python 3 which means I also had to install the Python3 versions of Selenium, Geckodriver, etc. in order to run my practice scripts for webscraping.
When I run my code, it prompts for a search term as I intended, but then it throws the following error:
Traceback (most recent call last):
File "/home/myName/Documents/Programming Misc/Python/craigslistSearch_linkGeneration_v02.py", line 15, in <module>
browser = webdriver.Firefox()
File "/usr/lib/python3/dist-packages/selenium/webdriver/firefox/webdriver.py", line 77, in __init__
self.binary, timeout),
File "/usr/lib/python3/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 47, in __init__
self.profile.add_extension()
File "/usr/lib/python3/dist-packages/selenium/webdriver/firefox/firefox_profile.py", line 91, in add_extension
self._install_extension(extension)
File "/usr/lib/python3/dist-packages/selenium/webdriver/firefox/firefox_profile.py", line 251, in _install_extension
compressed_file = zipfile.ZipFile(addon, 'r')
File "/usr/lib/python3.5/zipfile.py", line 1009, in __init__
self.fp = io.open(file, filemode)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/firefoxdriver/webdriver.xpi'
Here's the offending code:
from selenium import webdriver #To launch the browser (Firefox)
from selenium.webdriver.common.keys import Keys #To be able to send special keys (i.e., DOWN, UP, RIGHT, LEFT, TAB, HOME, etc.)
import time #To pause the program for x seconds
import string #To run string.replace()
import requests
#prompt the user to enter their desired search term
print('Please enter your search term')
searchTerm = input()
newSearchTerm = str.replace(searchTerm, ' ', '+')
#open browser and navigate to craigslist + user-defined search term(s)
browser = webdriver.Firefox()
type(browser)
searchURL = browser.get('https://seattle.craigslist.org/search/sss?query=' + newSearchTerm)