certificate verify failed: unable to get local issuer certificate

前端 未结 10 1271
梦如初夏
梦如初夏 2020-11-29 04:06

I am trying to get data from the web using python. I imported urllib.request package for it but while executing, I get error:

certificate verify failed: unab         


        
10条回答
  •  独厮守ぢ
    2020-11-29 05:02

    This worked in all OS:

    import ssl
    import certifi
    
    urlopen(request, context=ssl.create_default_context(cafile=certifi.where()))
    

提交回复
热议问题