我正在尝试使用WGET下载页面上出现的所有图像,看起来一切都很好,但该命令实际上只下载了前6个图像,并且没有更多。我不知道为什么。
我使用的命令:
wget -nd -r -P . -A jpeg,jpg http://www.edpeers.com/2013/weddings/umbria-wedding-photographer/
它只下载了页面的前6个相关图片和所有其他我不需要的东西,看看页面,你知道为什么它只下载前6个相关图片吗?
提前谢谢。
发布于 2014-11-11 22:44:47
我认为主要的问题是,该网站上只有6个jpeg,其他的都是gif,例如:
<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是一个jquery插件,它不会下载jpeg,请参阅http://www.appelsiini.net/projects/lazyload
尝试-p
而不是-r
wget -nd -p -P . -A jpeg,jpg http://www.edpeers.com/2013/weddings/umbria-wedding-photographer/
请参阅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.
https://stackoverflow.com/questions/26660051
复制相似问题