如何使用 wget 从网站下载所有文件(但不是 HTML)? [英] How to download all files (but not HTML) from a website using wget?
本文介绍了如何使用 wget 从网站下载所有文件(但不是 HTML)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用wget
从网站获取所有文件?
How to use wget
and get all the files from website?
我需要除 HTML、PHP、ASP 等网页文件之外的所有文件
I need all files except the webpage files like HTML, PHP, ASP etc.
推荐答案
要过滤特定的文件扩展名:
To filter for specific file extensions:
wget -A pdf,jpg -m -p -E -k -K -np http://site/path/
或者,如果您更喜欢长选项名称:
Or, if you prefer long option names:
wget --accept pdf,jpg --mirror --page-requisites --adjust-extension --convert-links --backup-converted --no-parent http://site/path/
这将镜像站点,但没有jpg
或pdf
扩展名的文件将被自动删除.
This will mirror the site, but the files without jpg
or pdf
extension will be automatically removed.
这篇关于如何使用 wget 从网站下载所有文件(但不是 HTML)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文