SSL: CERTIFICATE_VERIFY_FAILED with Python3

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 12:02:33
Bhavik

Go to the folder where Python is installed, e.g., in my case it is installed in the Applications folder with the folder name 'Python 3.6'. Now double click on 'Install Certificates.command'. After that error was gone.

Jia

In my case, I used the ssl module to "workaround" the certification like so:

import ssl

ssl._create_default_https_context = ssl._create_unverified_context

Then to read your link content, you can use:

urllib.request.urlopen(urllink)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!