Python 请求 SSL 错误 504
Python Requests SSL Error 504
我正在尝试使用请求连接到登录页面(https 页面)。
我的代码:
import requests
requests.get('https page')
这还是returns:
SSLError: [Errno 1] _ssl.c:504: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
我设置了 verify=False
但它仍然 returns 同样的错误。
像这样安装请求模块。这将安装额外的安全包。
pip install requests[security]
服务器要求SNI (server name indication) and will cause a TLS alert if the SNI extension is not used. SNI is available with python 3 and with python 2.7.9+. For older versions of python see using requests with TLS doesn't give SNI support。
我正在尝试使用请求连接到登录页面(https 页面)。 我的代码:
import requests
requests.get('https page')
这还是returns:
SSLError: [Errno 1] _ssl.c:504: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
我设置了 verify=False
但它仍然 returns 同样的错误。
像这样安装请求模块。这将安装额外的安全包。
pip install requests[security]
服务器要求SNI (server name indication) and will cause a TLS alert if the SNI extension is not used. SNI is available with python 3 and with python 2.7.9+. For older versions of python see using requests with TLS doesn't give SNI support。