selenium调用谷歌浏览器失败
错误信息:selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
解决方法:
from selenium import webdriver
option = webdriver.ChromeOptions()
# 绝对地址
option.binary_location = 'C:\Program Files\Google\Chrome\Application\chrome.exe'
driver = webdriver.Chrome(chrome_options=option)
driver.get('https://www.baidu.com')