如何使用wget / curl将给定网页上的所有链接下载到.zip文件? [英] How to download all links to .zip files on a given web page using wget/curl?

查看:826
本文介绍了如何使用wget / curl将给定网页上的所有链接下载到.zip文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

页面包含指向一组.zip文件的链接,所有这些文件都要下载。我知道这可以通过wget和curl完成。

A page contains links to a set of .zip files, all of which I want to download. I know this can be done by wget and curl. How is it done?

推荐答案

命令是:

wget -r -np -l 1 -A zip http://example.com/download/

选项含义:

-r,  --recursive          specify recursive download.
-np, --no-parent          don't ascend to the parent directory.
-l,  --level=NUMBER       maximum recursion depth (inf or 0 for infinite).
-A,  --accept=LIST        comma-separated list of accepted extensions.

这篇关于如何使用wget / curl将给定网页上的所有链接下载到.zip文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆