如何将网页快照及其所有元素(css,js,images,...)保存到一个文件中 [英] How to save a web page snapshot with all its elements (css, js, images, ...) into one file
问题描述
如何以编程方式将包含所有元素(css,js,images,...)的网页快照保存到一个文件中?
我需要定期存档一些网页。但是,保存HTML代码是无用的 - 不仅仅是因为图像丢失,而且还有esp。因为今天的页面上没有CSS可以将网页变成无法识别的混乱。
我记得像这样工作的.mht格式,但这需要手动保存,而这只是IE的一个功能。我相信有一个开源解决方案可以通过编程实现,但是尽管搜索了几个小时,我仍然无法在网络上找到它。 解决方案
How is it possible to programmatically save a web page snapshot with all its elements (css, js, images, ...) into one file?
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.
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.
这篇关于如何将网页快照及其所有元素(css,js,images,...)保存到一个文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!