简体   繁体   中英

download all images on the page with WGET

I'm trying to download all the images that appear on the page with WGET, it seems that eveything is fine but the command is actually downloading only the first 6 images, and no more. I can't figure out why.

The command i used:

wget -nd -r -P . -A jpeg,jpg http://www.edpeers.com/2013/weddings/umbria-wedding-photographer/

It's downloading only the first 6 images relevant of the page and all other stuff that i don't need, look at the page, any idea why it's only getting the first 6 relevant images?

Thanks in advance.

I think the main problem is, that there are only 6 jpegs on that site, all others are gifs, example:

<img src="http://www.edpeers.com/wp-content/themes/prophoto5/images/blank.gif"
 data-lazyload-src="http://www.edpeers.com/wp-content/uploads/2013/11/aa_umbria-italy-wedding_075.jpg"
 class="alignnone size-full wp-image-12934 aligncenter" width="666" height="444"
 alt="Umbria wedding photographer" title="Umbria wedding photographer" /

data-lazyload-src is a jquery plugin, which wouldn't download the jpegs, see http://www.appelsiini.net/projects/lazyload

Try -p instead of -r

wget -nd -p -P . -A jpeg,jpg http://www.edpeers.com/2013/weddings/umbria-wedding-photographer/

see http://explainshell.com :

-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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM