最佳答案
这是我的密码
import requests;
url='that website';
headers={
'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Accept-Language':'zh-CN,zh;q=0.9,en;q=0.8,ja;q=0.7',
'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'
};
r = requests.get(url,headers=headers);
print(r);
print(r.status_code);
然后它遇到了这个:
Requests.exceptions.SSLError:
HTTPSConnectionPool (host = ‘ www.xxxxxx.com’,port = 443) :
使用 url: xxxxxxx (由 SSLError (SSLCertVerificationError (1,’[ SSL: CERTIFICATE _ VERIFY _ FAILED ]引起)超过最大重试次数
证书验证失败: 无法获得本地颁发者证书 (_ ssl.c: 1045)’))
我该怎么办?