美文网首页
Python - 打开firefox

Python - 打开firefox

作者: Ego_1973 | 来源:发表于2017-05-22 17:44 被阅读0次

brower = webdriver.Firefox() #浏览器种类
wait = WebDriverWait(brower, 10) #设置最大等待浏览时间10s
我们会在第一句就报错,原因是因为缺少插件
需要自行去 https://github.com/mozilla/geckodriver/releases 官网下载

下载好之后放在:

Windows: python安装根目录(与python.exe 同一目录)
Mac:/usr/local/bin (直接把下载好的拖进去就可以了)

相关文章

网友评论

      本文标题:Python - 打开firefox

      本文链接:https://www.haomeiwen.com/subject/smhixxtx.html