当前位置:   article > 正文

selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for firefox using

selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for firefox using

意思大概是:selenium获取不到firefox的驱动(geckodriver.exe)

错误原因:1. firefox(或者其他的selenium浏览器驱动--e.g.webchrome、safari等)放置的位置不正确。

今天傻羊在用selenium爬虫的时候发现,原来能用的firefox 突然就报错说用不了,刚开始的时候针对版本不匹配的问题进行更改,包括降低版本、重新配置环境等一系列问题。其中

火狐的各历史版本:Firefox各历史版本链接

火狐各驱动历史版本:Firefox_selenium驱动各版本

谷歌驱动的各历史版本:Chrome各历史版本

谷歌浏览器的历史版本:谷歌浏览器历史版本

其中关于如何查找浏览器对应的、合适的selenium版本,仔细研读这些英文即可:

 下载好后,俺把驱动放在相应浏览器的根目录下,并添加到环境中:

 刚开始运行时没事,后来突然就报错:

selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for firefox using

俺也很纳闷,毕竟已经添加进环境变量了呀

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/34578?site
推荐阅读
相关标签