selenium 使用说明
selenium 安装及使用
Python 安装:
pip install seleniumMac 安装 chromedrive:
brew install chromedriver,此时本机 Chrome 版本为123.0.6312.107(正式版本) (arm64)
测试可用性,如果能打开浏览器并进入对应网页即为可用
1
2
3
4
5
6
7
8
9from selenium import webdriver
from selenium.common.exceptions import WebDriverException
dirver = webdriver.Chrome()
dirver.get('https://www.baidu.com')
try:
while True:
dirver.title
except WebDriverException:
pass
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 cv-programmer!




