我曾尝试在Python的Python TooManyRedirects:超过30重定向
url="http://www.realtor.com/realestateandhomes-search/Pittsburgh_PA/type-single-family-home/price-na-30000/sby-1/"
r=requests.get(url)
下面的代码,但它抛出
File "C:\Users\Dana\AppData\Local\Programs\Python\Python35-32\lib\site-package
s\requests\sessions.py", line 630, in send
history = [resp for resp in gen] if allow_redirects else []
File "C:\Users\Dana\AppData\Local\Programs\Python\Python35-32\lib\site-package
s\requests\sessions.py", line 630, in <listcomp>
history = [resp for resp in gen] if allow_redirects else []
File "C:\Users\Dana\AppData\Local\Programs\Python\Python35-32\lib\site-package
s\requests\sessions.py", line 111, in resolve_redirects
raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, respon
se=resp)
requests.exceptions.TooManyRedirects: Exceeded 30 redirects.
任何帮助,将不胜感激
的eror
我一直在使用该信息尝试并且在此情况下,没有错误,但我尝试废料页面不变量内加载。有没有一种方法来避免这个错误,但也有页面加载到Python? – Andrei