wget infinite redirection | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

wget infinite redirection

hello everyone i'm trying to crawl a website to download all the files in a specific a directory ,i used wget to do so but i'm facing this problem: << Reusing existing connection to index-of.es:80. HTTP request sent, awaiting response... 302 Found Location: http://index-of.es/ [following] 20 redirections exceeded. >>> it keeps redirecting me to the parent directory infinitely without fetching any content i tried some wget command arguments but it didn't work, i also tried python to do this job but didn't work as well i got this: from urllib.request import urlopen res=urlopen("http://index-of.es/Python") the output: raise HTTPError(req.full_url, code, urllib.error.HTTPError: HTTP Error 302: The. HTTP server returned a redirect error that would lead to an infinite loop. The last 30x error message was: Found the website is: http://index-of.es/Python

13th Jan 2021, 10:55 AM
Aɭoŋɘ ɭovɘʀ
1 Answer
0
send headers with your request may help you
14th Jan 2021, 10:56 AM
iman
iman - avatar