基本配置

1.安装Python以及用pip安装Selenium
2.下载相应浏览器的驱动,放到Python根目录
浏览器驱动下载地址
Chrome 67.0.3396.99
https://chromedriver.storage.googleapis.com/index.html?path=2.40/
IE 11.0
http://selenium-release.storage.googleapis.com/3.9/IEDriverServer_Win32_3.9.0.zip
火狐
最新的基本对应最新的 ,后面示例下载的0.21.0 浏览器61.0
https://github.com/mozilla/geckodriver/releases

其他配置

禁用浏览器中出现提示的Bar

option = webdriver.ChromeOptions()
option.add_argument('disable-infobars')
driver = webdriver.Chrome(chrome_options=option)
Last modification:February 28th, 2021 at 03:37 pm
硬币投入口