用下面的命令安装 Google Chrome
yum -y install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
也可以先下载至本地,然后安装
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
yum install ./google-chrome-stable_current_x86_64.rpm
安装必要的库
yum install mesa-libOSMesa-devel gnu-free-sans-fonts wqy-zenhei-fonts
查看谷歌 chrome 版本
google-chrome --version
chrome 官网
wget https://chromedriver.storage.googleapis.com/2.38/chromedriver_linux64.zip
淘宝源(推荐)
wget http://npm.taobao.org/mirrors/chromedriver/2.41/chromedriver_linux64.zip
将下载的文件解压,放在如下位置
unzip -d /usr/bin chromedriver_linux64.zip
给予执行权限
chmod +x /usr/bin/chromedriver
from selenium import webdriver
driver = webdriver.Chrome()