下载 html 页面以供离线使用

发布于 2024-11-24 13:19:14 字数 234 浏览 4 评论 0原文

我想通过下载 html 和所有图像/css 资源来使 html 页面可供离线查看,但不下载其他链接页面。

我正在查看 httrackwget 但找不到正确的参数集(我需要命令行)。

有什么想法吗?

I want to make an html page available for offline viewing by downloading the html and all images / css resources from it, but not other pages which are links.

I was looking at httrack and wget but could not find the right set of arguments (I need the command line).

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

请恋爱 2024-12-01 13:19:14

如果您想使用最新版本的 wget 下载,请使用 cygwin 安装程序获取
并使用此版本

wget -m –w 2 –p -E -k –P {target-dir} http://{website}

将 {website} 镜像到 {target-dir} (1.11.4 中没有图像)。

省略 -w 2 以加快进度。

If you want to download using the newest version of wget, get it using cygwin installer
and use this version

wget -m –w 2 –p -E -k –P {target-dir} http://{website}

to mirror {website} to {target-dir} (without images in 1.11.4).

Leave out -w 2 to speed up the progress.

四叶草在未来唯美盛开 2024-12-01 13:19:14

对于一页,以下 wget 命令行参数应该足够了。请记住,它可能不会下载所有内容,包括附加到 CSS 文件的背景图像等。

wget -p <webpage>

另请尝试 wget --help 获取所有命令行参数的列表。

For one page, the following wget command line parameters should be enough. Please keep in mind that it might not download everything including background images attached to CSS files etc.

wget -p <webpage>

Also try wget --help for a list of all command line parameters.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文