证书过期,超时等错误
加header,证书认证跳过,设置timeout时间
r = requests.get(url, verify=False, timeout=60, headers={
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'})
获取的结果乱码
编码格式有问题,转换一下编码格式
r = requests.get(url)
r.encoding = 'GBK'