Wget 具有-H
“跨度主机”选项
Span to any host—‘-H’
The ‘-H’ option turns on host spanning, thus allowing Wget's recursive run to visit any host referenced by a link. Unless sufficient recursion-limiting criteria are applied depth, these foreign hosts will typically link to yet more hosts, and so on until Wget ends up sucking up much more data than you have intended.
我想做一个递归下载(比如第 3 级),我想获取图像、样式表、javascript 等(即正确显示页面所需的文件),即使它们在我的主机之外。但是,我不想跟随指向另一个 HTML 页面的链接(因为那样它可以转到另一个 HTML 页面,以此类推,然后数字可能会爆炸。)
有可能以某种方式做到这一点吗?对于图像/样式表/javascript案例和链接案例,选项控件似乎-H
跨越到其他主机,而wget不允许我将两者分开。