解决 ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')) 问题

今天写了一个requests爬虫,在运行的时候发生了requests.exceptions.ConnectionError:('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')) 错误。

我马上google了这个问题,找到一个帖子,发现导致这种运行错误的因素有很多。

其中一种解决方法是通过安装requests的SSL/Https连接所需的可选安全软件包来解决它:

pip3 install "requests[security]"

 

 

 
posted @ 2020-06-14 16:00  /章鱼哥  阅读(11843)  评论(0)    收藏  举报