360 Secure SkillHub
360 安全技能中心

Web to Markdown Pro

通过命令行工具 web2md 抓取网页正文,使用 readability-lxml 提取主要内容、markdownify 转为 Markdown,可输出到指定文件;支持传入 URL 列表文件做批量转换,并提供基于本地 Ollama 的 AI 摘要选项。免费层限制为单个 URL、不下载图片、仅启发式回退摘要。

linbeiganlinniang
linbeiganlinniang
热度 23.10
最近更新 2026-05-13 12:06:46
分类:效率依赖:代码执行 / 读写文件 / 第三方 API / 内部调用大模型应用场景:文件转换 / 摘要总结 / 研究 / 笔记整理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add web2md-pro
Metadata
name
web2md
description
Convert any URL to clean, readable Markdown. Use when the user wants to save a web article as Markdown, extract clean content from a webpage, batch-convert URLs to Markdown files, or add AI summaries to web articles. Triggers on requests like "convert this to markdown", "save this article", "extract content from URL", "web to md", or when processing web reading lists.

Web to Markdown

Extract clean article content from any URL and convert it to readable Markdown.

Quick Start

web2md https://example.com/article
web2md https://example.com/article -o article.md
web2md https://example.com/article --summary

Installation

pip install web2md

Common Patterns

Save an article the user shared

web2md <url> -o ~/Documents/reading/<slug>.md

Extract with AI summary (needs Ollama running)

web2md <url> --summary --ai -o article.md

Batch convert a reading list

web2md urls.txt --batch -d output/

How It Works

web2md uses readability-lxml to extract the main article content (stripping ads, nav, sidebars) and markdownify to convert the HTML to clean Markdown. It preserves headings, links, lists, and text formatting while removing clutter.

What It's Good For

  • Saving articles for offline reading
  • Extracting content for LLM context
  • Archiving blog posts and news articles
  • Building a personal knowledge base from web content
  • Research: batch-convert sources to Markdown

Limits (Free Tier)

  • Single URL at a time
  • No image download
  • No AI summarization (heuristic fallback only)

For batch mode, image download, and AI features: https://web2md.dev (paid CLI, $19)