我正在使用 python 包 requests 将请求发送到 https://mobile.twitter.com/username/following。
起初,我遇到异常:requests.exceptions.SSLError: [Errno 8] _ssl.c:504: EOF occurred in violation of protocol。为了解决这个问题,我遵循这个 solution编写一个 SSLAdapter 来指定 PROTOCOL_TLSv1。
在那之后,我遇到了另一个异常:requests.exceptions.SSLError: [Errno bad handshake] (-1, 'Unexpected EOF')。而且,我找到了this , 但我在同一过程中发送请求和接收数据。
也许我发送请求的速度太快了?
请您参考如下方法:
你需要为 apache2 安装 mod_ssl
