SSL bad Handshake Error 10054 “WSAECONNRESET”

后端 未结 3 682
我在风中等你
我在风中等你 2021-02-14 04:22

Notes:

versions

Python 2.7.11 and my requests version is \'2.10.0\'
\'OpenSSL 1.0.2d 9 Jul 2015\'
Please read the below comment by Martijn Piet         


        
3条回答
  •  北海茫月
    2021-02-14 04:46

    I use python 2.7.6 and this simple example still working on my ubuntu 14.04

    #!/usr/bin/env python
    # -*- coding: utf-8 -*-
    
    import requests
    from requests.packages.urllib3.exceptions import InsecureRequestWarning
    
    requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
    
    with open('out.docx', 'wb') as h :
        r = requests.get("https://www.neco.navy.mil/necoattach/N6945016R0626_2016-06-20__INFO_NAS_Pensacola_Base_Access.docx", verify=False, stream=True)
    
        for block in r.iter_content(1024):
            h.write(block)
    

提交回复
热议问题