如何让wget下载整个子网站而不下载整个网站

时间:2019-05-20 20:29:59

标签: web wget downloading

我需要下载和存档大约50个子网站(包括该子网站内的所有工作链接),这些子网站是作为公司主门户网站的一部分创建的。我需要wget来下载子站点,而不必下载整个站点。

从搜索的角度来看,这是我到目前为止已经尝试过的

wget --mirror --page-conditions --convert-links --recursive --adjust-extension --compression = auto --reject-regex“ / search | / rss” --no-if-modified-自--no-check-certificate --user = xxxxxxx --password = xxxxxxx

这反而下载了每个子站点的主页,而没有任何实际的链接。

1 个答案:

答案 0 :(得分:2)

您应该添加--no-parent以限制到所需的部分。

示例行为wget --mirror --convert-links --page-requisites ----no-parent -P /path/to/download https://example-domain.com