[英]wget all images from a single web page
Is there a way to get wget to download all of the image files directly linked from a given web page? 有没有办法让wget下载从给定网页直接链接的所有图像文件?
In this particular case, the web page contains several "img" tags and I just want to download those images. 在这种特殊情况下,网页包含几个“img”标签,我只想下载这些图像。 I can't seem to get this to work with any combination of -r, -l, -p, -A, etc. No matter what I do wget completely ignores the images, even when I try specifying -r -p -A jpg.
我似乎无法使用-r,-l,-p,-A等的任何组合工作。无论我做什么,wget完全忽略图像,即使我尝试指定-r -p -A JPG。
When I'm using -r it also seems to generate a lot of requests for the same page but with a variety of different query strings attached. 当我使用-r时,它似乎也会为同一页面生成大量请求,但附加了各种不同的查询字符串。 It would be nice if I could avoid this too somehow.
如果我能以某种方式避免这种情况会很好。
Thanks for any pointers. 谢谢你的任何指示。
wget -nd -p --accept=.jpg <url>
-nd
will not create directories -p
says download the requisites for the page -nd
不会创建目录-p
表示下载页面的必备条件
This does not do recursive so it will only download jpg
images for the current page, you can add -r
if you want to do all the pages 这不会递归,因此它只会下载当前页面的
jpg
图像,如果要执行所有页面,可以添加-r
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.