SSL error : routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

后端 未结 7 1954
梦毁少年i
梦毁少年i 2020-12-15 03:56

I have a large number of file download links in a txt file. I am trying to write a python script to download all the files at once, but I end up wi

7条回答
  •  醉梦人生
    2020-12-15 04:29

    Normally updating certifi and/or the certifi cacert.pem file would work. I also had to update my version of python. Vs. 2.7.5 wasn't working because of how it handles SNI requests.

    Once you have an up to date pem file you can make your http request using:

    requests.get(url, verify='/path/to/cacert.pem')

提交回复
热议问题