我一直在尝试在我的笔记本电脑上使用selenium,但我总是出错,大约1小时后,我已经尝试自己修复它了
Selenium version: 3.141.0
chromedriver versoin: 860224
Chrome version: 90.0.4430.11
OS: Arch Linux x86_64
我有以下代码(从posthere复制而来):
import selenium
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
options = Options()
options.binary_location = r'/opt/google/chrome-unstable/google-chrome-unstable'
driver = webdriver.Chrome(options= options, executable_path= '/home/andrei399/Downloads/chromedriver_linux64/chromedriver')
driver.get('http://google.com/')
有人能帮我吗?我已经看了很多东西,在我重新启动我的笔记本电脑之前,它说它找不到任何二进制文件,尽管路径直接指向x程序,我已经尝试使用chrome(而不是chrome不稳定),尽管现在这似乎不再是问题
您正在使用webdriver.Chrome函数,但已导入firefox选项
将代码更改为以下内容
相关问题 更多 >
编程相关推荐