首页 文章

Python:尝试使用Selenium打开IDLE中的网页= ConnectionAbortedError:[WinError 10053]

提问于
浏览
0

我是Python新手并关注Automate The Boring Stuff一书(https://automatetheboringstuff.com/chapter11/

目前我遇到了一个错误 . 我一直在谷歌搜索几个小时,但似乎无法找到类似的东西或对我有用 .

这是我的代码:

from selenium import webdriver
    browser = webdriver.Firefox()
    browser.get('https://google.com')

我一直遇到这个错误:

ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

除了用pip.exe安装selenium之外,我还必须安装Geckodriver . 我将Geckodriver添加到PATH以修复另一个错误 . 我还尝试将Python,IDLE,Geckodriver和Selenium添加到Windows防火墙例外 . 最后,我已禁用防病毒软件的所有组件(Avast) .

我可以尝试任何建议或事项吗?我的目标是对网页进行操作,例如点击字段,输入文字等 .

感谢帮助!

1 回答

  • 0

    我找到了解决方案 . Geckodriver是个问题 . 我用的是0.21 . 通过下载0.20.1,并运行与上面相同的命令,错误消失了 . 我仍然注意到某些连接到某些网站的问题,但我还没有多次尝试得到10053错误 .

相关问题