requests.exceptions.SSLError: HTTPSConnectionPool(host=’xx.xx.xx.xx’, port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1056)’)))
解决方案: 添加参数 verify=False
from requests import session
link = "https://www.example.com"
s = session()
r = s.get(link,verify=False)
r.encoding = "utf-8"
print(r.text)