urlopen错误[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败

时间:2018-07-16 17:05:50

标签: python windows-server-2008-r2 discord.py

当我尝试运行代码时,出现错误:

  

SSL:CERTIFICATE_VERIFY_FAILED

我在Windows Server 2008上。

headers = {
        'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
        'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
        'Accept-Encoding': 'none',
        'Accept-Language': 'en-US,en;q=0.8',
        'Connection': 'keep-alive'}
    request_ = urllib.request.Request(url, None, headers)
    response = urllib.request.urlopen(request_)

0 个答案:

没有答案