python requests 遇到一些https站点的报错及解决
报错:
Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_ske_dhe', 'dh key too small')],)",),)
解决:
pip install --ignore-installed pyOpenSSL --upgrade
报错:
InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.
解决:
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
报错:
(Caused by SSLError(CertificateError("hostname '' doesn't match either of '', ''",),))
解决:
verify=False
Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_ske_dhe', 'dh key too small')],)",),)
解决:
pip install --ignore-installed pyOpenSSL --upgrade
报错:
InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.
解决:
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
报错:
(Caused by SSLError(CertificateError("hostname '' doesn't match either of '', ''",),))
解决:
verify=False
评论
发表评论