Requests报错:requests.exceptions.SSLError: HTTPSConnectionPool 和 Max retries exceeded with url

场景描述

在使用Requests高频率请求一些链接的时候,经常会遇到类似以下的报错,那么遇到这种情况该怎么办呢?

requests.exceptions.SSLError: HTTPSConnectionPool
HTTPConnectionPool(host='tjsj.chinacoal.com', port=80): Max retries exceeded with url: /module/download/downfile.jsp?classid=0&filename=0c473a02bef64bb2a0e10283b7e20956.doc (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))

解决方案

import urllib3

import requests

# 增加重试连接次数
requests.adapters

你可能感兴趣的:(Python,Error,#,Requests,Requests,Python,Error)