Trying to run the following script to go to this website and click a link to export a csv.
from selenium import webdriver
driver=webdriver.Firefox()
driver.get("https://www.draftkings.com/contest/gamecenter/46877680")
elem1 = driver.find_element_by_link_text("Export Lineups to CSV")
elem1.click()
I get the following error and can't find a geckodriver
. I pip installed selenium. I got this from an older video and I currently run Python 3.6
so that is probably part of the problem as well. Where am I going wrong?
Traceback (most recent call last): File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start stdout=self.log_file, stderr=self.log_file) File "C:\Program Files\Python36\lib\subprocess.py", line 707, in init restore_signals, start_new_session) File "C:\Program Files\Python36\lib\subprocess.py", line 992, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:/Users/mike/Desktop/Lineup1.py", line 2, in driver=webdriver.Firefox() File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 144, in init self.service.start() File "C:\Program Files\Python36\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.