需要命令或程序才能下载所有图像

时间:2016-03-13 23:23:59

标签: download command wget

我需要软件或命令来从使用以下表格的网站下载所有图像:

website/images/imgs/folder1/folder2/imageName.png

folder1 = This folder start from 0 and continues to infinity.
folder2 = This folder start from 0 and continues to infinity.
imageName = Image name start from 0.png and continues to infinity.

如果文件夹服务器显示403 Forbidden且未找到文件夹服务器响应404 Not Found 对于图像,如果有图像服务器显示图像,如果图像不存在服务器响应404 Not Found 我需要使用此formul

下载软件或命令

图像的一些示例:

website/images/imgs/0/0/0.png
website/images/imgs/0/25/36.png
website/images/imgs/10/0/158.png
website/images/imgs/5/5/5.png
website/images/imgs/11/285/350.png
website/images/imgs/8/12/45.png
website/images/imgs/9/200/350.png

我需要像下面这样保存它们:

/home/me/downloads/images/imgs/0/0/0.png
/home/me/downloads/images/imgs/0/25/36.png
/home/me/downloads/images/imgs/10/0/158.png
/home/me/downloads/images/imgs/5/5/5.png
/home/me/downloads/images/imgs/11/285/350.png
/home/me/downloads/images/imgs/8/12/45.png
/home/me/downloads/images/imgs/9/200/350.png

1 个答案:

答案 0 :(得分:0)

编号文件的语法是 {startnumber..lastnumber} ,因此在下面的情况下,0开始,99999最后(您可以根据您的要求进行更改)

您可以使用以下命令从/ 0/0 /文件夹下载所有图像。但是您需要手动更改下一个foldername的foldername以下载下一个文件夹的图像。

wget http://example.com/images/imgs/0/0/{0..99999}.png

或尝试以下命令:)

wget http://example.com/images/imgs/{0..999}/{0..999}/{0..99999}.png