美文网首页
做爬虫遇到urllib.error.URLError:

做爬虫遇到urllib.error.URLError:

作者: 俗不可耐的旺财 | 来源:发表于2020-05-04 10:08 被阅读0次
    1. 怎么解决?
      首先搜索了各种方法,网上没有给出明确的答案,在这里探索一下:
      https://www.ixsystems.com/community/threads/urlopen-error-errno-61-connection-refused-after-upgrade-to-11-2-and-trying-to-find-a-plugin.71851/
      这位玩家从终端ping了谷歌网站,有评论说是防火墙的原因。

    try1,我尝试从终端ping www.baidu.com,没问题。

    • https://www.v2ex.com/t/336907遇到同样问题,尝试的结论是“用 python3 一样的结果,但是终端里面是可以 ping 通的,并且终端里面其他的软件比如 curl 也是可以使用的,偏偏 python 跪了,不知道为什么”

    try2,我用curl 从终端尝试访问百度。结果curl: (7) Failed to connect to localhost port 1087: Connection refused #似乎找到了问题, localhost无法链接

    try2-已解决:ucrl无法访问网站的问题。详细见下面的网址
    https://blog.csdn.net/weixin_38705903/article/details/101911553

    在终端输入export -p,如果发现有ftp_proxy、http_proxy、https_proxy这三个东西的话,那么本解决方法就是适用于你!

    相关文章

      网友评论

          本文标题:做爬虫遇到urllib.error.URLError:

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