你的位置:首页 > 信息动态 > 新闻中心
信息动态
联系我们

selenium linux环境配置

2021/12/21 6:57:01

1.安装selenium
2.安装 chrome
下载https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
yum install google-chrome-stable
3.安装chrome drive
google-chrome --version
http://chromedriver.storage.googleapis.com/index.html

https://ftp.lysator.liu.se/pub/opensuse/update/leap/15.2-test/src/chromium-96.0.4664.110-lp152.2.143.1.src.rpm
yum install chromedriver-96.0.4664.110-lp152.2.143.1.x86_64.rpm–skip-broken

wget http://npm.taobao.org/mirrors/chromedriver/2.41/ chromedriver_linux64.zip

运行selenium得时候没有找到驱动chromedriver
selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
4.代码指定路径
指定驱动器位置
browser = webdriver.Chrome(’/data/engine-company-name-match/company_name_classify/