I am trying to automate some stuff I do day-to-day online and get some experience in webscraping. I saw some stuff about Selenium and Python being good for beginners and thought I would give it a try. I ended up getting a simple script to work on my home computer but it doesn't find the Chrome binary at the path I am giving and I do not know what to do.
I used this to set my PATH environment variable to the directory that holds my chromedriver https://youtu.be/dz59GsdvUF8
I downloaded ChromeDriver 74.0.3729.6 (latest stable release) from https://sites.google.com/a/chromium.org/chromedriver/
I am using python3, visual studio code, and Ubuntu if any of that matters.
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
#Stack overflow said to try this but could not make it work
#opts = webdriver.ChromeOptions()
#opts.binary_location = "C:\webdrivers\chromedriver.exe"
#browser = webdriver.Chrome(chrome_options=opts)
#this is where my chrome is
#C:\Users\tucker.steven2\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Virtual Programs\Google Chrome\Chrome v62
#I have a chromedriver in the same directory as my python code
browser = webdriver.Chrome('chromedriver.exe')
browser.get(https://www.something.com/) #just a generic site
browser.quit()
My expected result is to open a chrome window to Hulu's website, the error I get is:
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.16299 x86_64)