请求大神帮忙看看

46 阅读1分钟

使用 Python 的 requests 库时遇到了 SSL 证书错误和连接被远程主机重置的问题。该怎么办呢。在请求中添加 verify=False 参数来禁用 SSL 证书验证,也没有用。 提示错误如下:

print(res.status_code)
print(res.text)
requests.exceptions.SSLError: HTTPSConnectionPool(host='隐藏的IP地址', port=443): Max retries exceeded with url: /login.shtml?method=logout (Caused by SSLError(CertificateError("hostname '隐藏的IP地址' doesn't match either of '*.xxxx.cn', 'xxxx.cn'",),))