今天写了一个requests爬虫,在运行的时候发生了requests.exceptions.ConnectionError:('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')) 错误。
我马上google了这个问题,找到一个帖子,发现导致这种运行错误的因素有很多。
其中一种解决方法是通过安装requests的SSL/Https连接所需的可选安全软件包来解决它:
pip3 install "requests[security]"