首先,安装selenium模块
python
pip3 install selenium
查看系统内chrome版本:
bash
google-chrome --version

根据谷歌浏览器版本下载对应的浏览器驱动版本:
bash
wget https://storage.googleapis.com/chrome-for-testing-public/126.0.6478.114/linux64/chromedriver-linux64.zip
解压安装:
bash
unzip chromedriver-linux64.zip
mv chromedriver-linux64/chromedriver /usr/bin/
chmod +x /usr/bin/chromedriver
chromedriver -version