如何将网页快照及其所有元素(css、js、图像等)保存到一个文件中 [英] How to save a web page snapshot with all its elements (css, js, images, ...) into one file

查看:40
本文介绍了如何将网页快照及其所有元素(css、js、图像等)保存到一个文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何以编程方式将网页快照及其所有元素(css、js、图像等)保存到一个文件中?

How is it possible to programmatically save a web page snapshot with all its elements (css, js, images, ...) into one file?

我需要定期存档一些网页.然而,仅仅保存他们的 HTML 代码是没有用的——不仅是因为图像丢失,尤其是因为图像丢失.因为当今页面上缺少 CSS 可能会将网页变成无法识别的混乱.

I need to archive some web pages regularly. However, just saving their HTML code is useless - not only because of images missing but esp. because the absence of CSS on today's pages can turn a web page into unrecognizable mess.

我记得 .mht 格式是这样工作的,但这需要手动保存,这只是 IE 的一个功能.我相信有一个开源解决方案可以通过编程实现这一点,但尽管搜索了数小时,我还是无法在网络上找到它.

I remember the .mht format that worked like this, but that required manual saving, and it was just a feature of IE. I believe there is an open-source solution that can achieve this programmatically, but despite hours of searching I cannot find it on the web.

推荐答案

HTTrack, -%M

这篇关于如何将网页快照及其所有元素(css、js、图像等)保存到一个文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆