如何下载某个网站的所有页面?
任何平台都可以。
答案1
答案2
获得是用于此类任务的经典命令行工具。它随大多数 Unix/Linux 系统提供,您可以获取它对于 Windows在 Mac 上,自制是最简单的安装方法(brew install wget
)。
你会做类似的事情:
wget -r --no-parent http://example.com/songs/
答案3
使用 wget:
wget -m -p -E -k www.example.com
选项解释:
-m, --mirror Turns on recursion and time-stamping, sets infinite
recursion depth, and keeps FTP directory listings.
-p, --page-requisites Get all images, etc. needed to display HTML page.
-E, --adjust-extension Save HTML/CSS files with .html/.css extensions.
-k, --convert-links Make links in downloaded HTML point to local files.
-np, --no-parent Don't ascend to the parent directory when retrieving
recursively. This guarantees that only the files below
a certain hierarchy will be downloaded. Requires a slash
at the end of the directory, e.g. example.com/foo/.