- 安装依赖库
pip install selenium
- 打开谷歌浏览器,搜索框输入如下,查看版本
chrome://version
-
解压后,将驱动放到python安装目录Scripts文件夹下
-
测试代码
from time import sleep
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("www.baidu.com")
# 刷新1000次
for i in range(1000):
driver.refresh()
sleep(5)
标签:浏览器,谷歌,driver,sleep,刷新,import,定时
From: https://www.cnblogs.com/dogleftover/p/18146915