我曾嘗試在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