Selenium
使用 Selenium
需要安装两样东西:客户端库
和 浏览器驱动
中文文档:https://www.selenium.dev/zh-cn/documentation/
浏览器驱动
推荐使用 Google Chrome
浏览器
首先需要确定自己的Google浏览器版本,进入如下网页下载对应版本的驱动
Google Chrome 驱动下载:https://chromedriver.storage.googleapis.com/index.html
下载后,将解压出来的 chromedriver.exe
驱动文件,放到一个方便之后使用的地方,路径不要存在中文或空格
Microsoft Edge 驱动下载:https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/