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

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

问题描述

如何以编程方式将包含所有元素(css,js,images,...)的网页快照保存到一个文件中?

我需要定期存档一些网页。但是,保存HTML代码是无用的 - 不仅仅是因为图像丢失,而且还有esp。因为今天的页面上没有CSS可以将网页变成无法识别的混乱。

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

HTTrack -%M


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.

解决方案

HTTrack, -%M

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

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