SSL: CERTIFICATE_VERIFY_FAILED with urllib

前端 未结 4 566
南旧
南旧 2020-12-28 20:19

I\'m running into trouble with the module urllib (Python 3.6). Every time I use the module, I get a page\'s worth of errors.

what\'s wrong with urllib and how to fi

4条回答
  •  长发绾君心
    2020-12-28 20:46

    a dirty but fast hack like this do the job for me:

    import ssl
    
    ssl._create_default_https_context = ssl._create_unverified_context
    

提交回复
热议问题