Python 官方文档:入门教程 => 点击学习
selenium的安装 直接通过pip install selenium就可以安装了,非常简单。 使用Firefox时 报错:selenium.common.exceptions.WEBDriverException: Message: '
直接通过pip install selenium就可以安装了,非常简单。
报错:selenium.common.exceptions.WEBDriverException: Message: 'geckodriver' executable needs to be in PATH.
说明没有安装Firefox的驱动。
https://GitHub.com/mozilla/geckodriver/releases
下载适合自己的包。
报错:selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.
说明没有安装Chrome的驱动。
Http://chromedriver.storage.Googleapis.com/index.html
下载是自己的包。
IE浏览器:http://selenium-release.storage.googleapis.com/index.html
Edge浏览器:http://go.microsoft.com/fwlink/?LinkId=619687
在windows下,需要将下载的包解压后,放到python的根目录下,指定目录应该也是可以的,毕竟linux都可以呢。
在Linux下,我就是放到了与脚本同路径下,然后在程序里写的全路径。
--结束END--
本文标题: python3+selenium访问网页
本文链接: https://www.lsjlt.com/news/188660.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0