解决python urllib3报错urllib3.exceptions.MaxRetryError xxx [SSL: CERTIFICATE_VERIFY_FAILED] xxx

完整报错如下:
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='xxxxx', port=443): Max retries exceeded with url: xxxxxxx (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))

解决方法

创建连接池时,使用:

import urllib3

http = urllib3.PoolManager(cert_reqs='CERT_NONE')

你可能感兴趣的:(python,运维,网络,python,网络协议,ssl)