错误提示如下:
raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, response=resp)
requests.exceptions.TooManyRedirects: Exceeded 30 redirects.
原来程序的的获取是通过一下程序来访问url的:
r = requests.get(url)
print(r.text)
解决方案:
s = requests.session()
s.headers=headers
r=s.get(url)
原因:
目前不清楚