0

我想从网站下载多个编号的图像。

图像的结构如下:

http://website.com/images/foo1bar.jpg

http://website.com/images/foo2bar.jpg

http://website.com/images/foo3bar.jpg

...而且我想在特定时间间隔内下载所有图像。

是否有简单的浏览器插件可以做到这一点,或者我应该使用“wget”等吗?

感谢您的时间。

4

1 回答 1

0

粗略地说,在类 Unix 系统上:

#!/bin/sh
for i in {1..3}
do
    wget http://website.com/images/foo"$i"bar.jpg
done

尝试谷歌搜索“bash for loop”。

编辑大声笑!事实上,我匆忙省略了下载图像文件的程序的名称。此外,这会进入文本编辑器,然后使用任意文件名保存它,使用命令使其可执行

chmod u+x the_file_name

最后你运行它

./the_file_name
于 2014-11-10T22:24:43.373 回答