Open the command line tool to type
pip3 install selenium
Verify whether the third-party package is successfully installed
pip3 show selenium
(1) download chromedriver
drive , And put it on python Under the root directory of
chromedriver Download address : http://npm.taobao.org/mirrors/chromedriver/
Note that the downloaded version must correspond to your own Google version !!!
see python Root directory which python3
Unzip the downloaded file , take chromedriver
Files in python root directory
On the computer desktop command+shift+G
Go to folder Input /usr/local/bin
Enter the directory
(2) Turn off browser auto update
If you are worried about the automatic update of Google version on your computer , So you need Turn off automatic updates
MAC close Chrome Auto update
from selenium import webdriver
dri = webdriver.Chrome()
dri.get('https://blog.csdn.net/Song_Lun/article/details/121017030')