本章内容python
执行:res = requests.post(api,mdata = post_data)api
报错:SSLError: EOF occurred in violation of protocol (_ssl.c:600)post
命令测试:测试
显然ssl握手没有成功,spa
查看openssl version 版本,不是最新的版本,而后涉及到最新的版本,可是blog
python -c 'import ssl; print(ssl.OPENSSL_VERSION)' ,python中仍是旧的版本,不知道如何升级python中的openssl接口
搜索各类资料,没有结果偶然间看到pyOpenSSL这个模块,抱着试一下的态度安装了这个模块,ssl
而后调用前 import OpenSSL 而后再去调用接口,问题就这样解决了............ openssl