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
2023-11-23 23:08:52
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