如何仅镜像网站的一部分? [英] How to mirror only a section of a website?
本文介绍了如何仅镜像网站的一部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法让 wget 镜像网站的一部分(根目录下的文件夹路径) - 它似乎只能在网站主页上工作.
I cannot get wget to mirror a section of a website (a folder path below root) - it only seems to work from the website homepage.
我尝试了很多选择 - 这是一个例子
I've tried many options - here is one example
wget -rkp -l3 -np http://somewebsite/subpath/down/here/
虽然我只想镜像该 URL 下方的内容链接 - 我还需要下载不在该路径中的所有页面资产.
While I only want to mirror the content links below that URL - I also need to download all the page assets which are not in that path.
主页 (/
) 似乎工作正常,但我无法为任何子文件夹使用它.
It seems to work fine for the homepage (/
) but I can't get it going for any sub folders.
推荐答案
使用 --mirror
(-m
) 和 --no-parent
(-np
) 选项,加上一些很酷的选项,就像这个例子:
Use the --mirror
(-m
) and --no-parent
(-np
) options, plus a few of cool ones, like in this example:
wget --mirror --page-requisites --adjust-extension --no-parent --convert-links
--directory-prefix=sousers http://stackoverflow.com/users
这篇关于如何仅镜像网站的一部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文