← 返回
未分类

网页转 MHTML 存档

网页转MHTML存档工具。当用户说"html转mhtml"、"网页保存为mhtml"、"网页转mhtml"、"保存网页"、"网页存档"、"离线保存网页"、"把网址转成mhtml"、"下载网页为单文件"时使用此skill。英文关键词:mhtml, mht, webpage archive, save webpage offline.
网页转MHTML存档工具。当用户说"html转mhtml"、"网页保存为mhtml"、"网页转mhtml"、"保存网页"、"网页存档"、"离线保存网页"、"把网址转成mhtml"、"下载网页为单文件"时使用此skill。英文关键词:mhtml, mht, webpage archive, save webpage offline.
娟子是个米
未分类 community v1.0.1 2 版本 100000 Key: 无需
★ 0
Stars
📥 112
下载
💾 5
安装
2
版本
#latest

概述

HTML to MHTML Converter

Convert any webpage into a single .mhtml file, embedding all resources (images, CSS, JS) for offline viewing. Output format is compatible with Chrome/Edge browsers.

Usage

python ~/.qclaw/skills/html-to-mhtml/scripts/html_to_mhtml.py "<URL>" [output.mhtml]

Examples:

# Save to auto-generated filename
python html_to_mhtml.py "https://example.com"

# Specify output filename
python html_to_mhtml.py "https://news.ycombinator.com" "hn_archive.mhtml"

# Save Chinese webpage
python html_to_mhtml.py "https://www.baidu.com" "baidu_home.mhtml"

Parameters

ParameterRequiredDescription
----------------------------------
URLYesWebpage URL to convert
outputNoOutput .mhtml filename (auto-generated if omitted)

Features

  • Downloads complete webpage with all linked resources
  • Embeds images, CSS, JavaScript into single file
  • Chrome-compatible MHTML format (Blink format)
  • Quoted-printable encoding for text, base64 for binary
  • Proper Content-ID and cid: reference handling
  • Opens in Chrome, Edge, and other MHTML-compatible browsers

Dependencies

pip install -r requirements.txt

Technical Notes

The script generates MHTML in Chrome's native format:

  • From: header
  • Snapshot-Content-Location for original URL
  • quoted-printable encoding for HTML/CSS/JS
  • base64 encoding for images and binary files
  • Proper Content-ID: format

Workflow

  1. User provides URL
  2. Run script: python html_to_mhtml.py ""
  3. Return path to created .mhtml file

版本历史

共 2 个版本

  • v1.0.1 修正mhtml标头type空白,不显示问题 当前
    2026-04-21 12:07 安全 安全
  • v1.0.0 将网页 URL 转换为 MHTML 单文件存档,方便离线查看
    2026-04-21 11:40 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

augtogod自动化助手

user_2a67a6dc
本工具为autogod自动化助手的可用辅助skill
★ 0 📥 190

agentAI模糊语义交互

user_2a67a6dc
处理用户模糊/不完整输入,提供智能澄清交互(Python版本)
★ 0 📥 95

augtogod自动化UI

user_2a67a6dc
AIGame/AutoGOD UI速查手册 — 布局/控件/容器/API/案例全覆盖,布局,UI,此技能依赖于(autogod.skill)技能。
★ 0 📥 85