# 解决“Max retries exceeded with url”问题
s = requests.session()
s.keep_alive = False
#  忽略警告:InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.
# HTTPSConnectionPool(host='api.github', port=443): Max retries exceeded with url
requests.packages.urllib3.disable_warnings()

r = requests.get(url, headers=headers, verify=False)

更多推荐

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