[英]How to wget a single page with NO assets ONLY the HTML page
Can someone give me the wget command to download a single html page without any assets.谁能给我 wget 命令来下载没有任何资产的单个 html 页面。 Literally only the html page, and nothing else.从字面上看,只有 html 页面,没有别的。 Example:例子:
wget --no-check-certificate --level=0 https://blablabla.com/get?id=1111 wget --no-check-certificate --level=0 https://blablabla.com/get?id=1111
result: 1111.html结果:1111.html
wget
man page states that wget
手册页指出
--level=depth
Set the maximum number of subdirectories that Wget will
recurse into to depth. In order to prevent one from
accidentally downloading very large websites when using
recursion this is limited to a depth of 5 by default, i.e.,
it will traverse at most 5 directories deep starting from the
provided URL. Set -l 0 or -l inf for infinite recursion
depth.
wget -r -l 0 http://<site>/1.html
Ideally, one would expect this to download just 1.html. but
unfortunately this is not the case, because -l 0 is
equivalent to -l inf---that is, infinite recursion. To
download a single HTML page (or a handful of them), specify
them all on the command line and leave away -r and -l.(...)
So --level=0
does mean infinite recursion, you should not provide any --level
if you want to download single file.所以--level=0
确实意味着无限递归,如果你想下载单个文件,你不应该提供任何--level
。 Taking this into account your command should be altered to考虑到这一点,您的命令应更改为
wget --no-check-certificate https://blablabla.com/get?id=1111
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.