Downloading images via wget

0

When downloading an image with wget using wget link I get the following errors:

HTTP request sent, awaiting response... 302 Moved Temporarily
Location:  [following]
--2015-05-24 14:47:46--  http://stripovionline.com/AlanFord/0002_Suplji_zub/1.jpeg
Reusing existing connection to stripovionline.com:80.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location:  [following]
--2015-05-24 14:47:47--  http://stripovionline.com/AlanFord/0002_Suplji_zub/1.jpeg
Reusing existing connection to stripovionline.com:80.

And after 20 times it terminates with message 20 redirections exceeded.

I can normally visit the link and download the image manually though.

RidableCthulu

Posted 2015-05-24T12:50:05.307

Reputation: 101

Answers

1

I can't download that image with my browser either getting "The page isn't redirecting properly" error, so this may as well be a correct wget behavior. I suggest you try to download some other image to confirm. For example http://cdn.sstatic.net/superuser/img/sprites.svg opens fine for me.

If you need to download a file which is only accessible from a particular page, like http://stripovionline.com/index.html, you'll need to pass that URL to wget as a referer:

wget --referer="http://stripovionline.com/index.html" "http://stripovionline.com/AlanFord/0002_Suplji_zub/1.jpeg"

Dmitry Grigoryev

Posted 2015-05-24T12:50:05.307

Reputation: 7 505

Your link works fine. It seems that it's their website's behaviour since they don't allow direct links. When I manage to get to the image, I can save it manually. – RidableCthulu – 2015-05-24T13:01:27.840