0

I want to download the images of just one page on tumblr.
For example http://landscapes.tumblr.com/page/7

When loading this page on browser (I've tried firefox and chrome) there are exactly 15 images but when I try to download them with wget I get 60 images (corresponding to pages 7-11). The command I use for downloading is

wget -H -k -p -R "*avatar*" -A '.jpeg,.jpg,.bmp,.gif,.png' -np -nd -N -erobots=off -i http://landscapes.tumblr.com/page/7

Could someone explain me why wget downloads more pages than the one given as argument and how to get it to download just one page? Thank u in advance.

2
  • 2
    Why are you using -i before the page URL? If I remove that, I get only 16 files downloaded.
    – JigglyNaga
    Aug 17, 2016 at 15:02
  • @JigglyNaga I had used that command to download tumblr images a few years ago, If I remember correctly the -i option was necessary to download from urls in a plain text file. I tried with variants of this command but didn't think of supressing that. It works well now. Thank you!! :)
    – Jonh
    Aug 17, 2016 at 20:38

1 Answer 1

1

From the wget manual:

-i file

--input-file=file

Read URLs from a local or external file.

[...]

-p

--page-requisites

This option causes Wget to download all the files that are necessary to properly display a given HTML page. This includes such things as inlined images, sounds, and referenced stylesheets.

As your command includes both, you're retrieving the original page, everything linked from it (including all those later pages), and all the requisites of every one of those pages.

After removing the -i, it only fetches the requisites for the original page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .