其他分享
首页 > 其他分享> > host=‘api.github.com‘, port=443): Max retries exceeded with url

host=‘api.github.com‘, port=443): Max retries exceeded with url

作者:互联网

python写爬虫报错

host='api.github.com', port=443): Max retries exceeded with url

 

解决方法,在

requests.get(url, headers=headers)

前,

添加如下代码

# 解决“Max retries exceeded with url”问题
s = requests.session()
s.keep_alive = False

标签:retries,github,443,Max,url,exceeded,port
来源: https://blog.51cto.com/u_15077160/2915172