url2markdown

网页 URL 转 Markdown:将任意网页 URL 转换为包含图片的 Markdown 文档,便于将网页保存为 Markdown 或将 URL 转为可读文本。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "url2markdown":https://skillpi.com/zh/skills/deepskill-02842d67192cd08e31f7b90cccfeba92c33525406647b522055d0d2ebefe349e。安装前核对上游来源和版本:https://skillhub.cn/skills/user_6c29a21a/url2markdown。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

网页 URL 转 Markdown:将任意网页 URL 转换为包含图片的 Markdown 文档,便于将网页保存为 Markdown 或将 URL 转为可读文本。

0 下载

介绍来源: third_party · user_6c29a21a · 1.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
输入和输出
The script generates a directory structure like this: The Markdown file includes: YAML frontmatter with metadata | 带元数据的YAML frontmatter Clean Markdown content | 干净的Markdown内容 Image references as relative paths | 图片引用为相对路径 Footer with source URL and generation info | 包含来源URL和生成信息的页脚
软件、账号及付费要求
Python 3.6+ `requests` — HTTP requests `beautifulsoup4` — HTML parsing Auto-installs on first run if missing. 首次运行时会自动安装所需依赖。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: "url2markdown"
description: "Converts any webpage URL to a Markdown document with images. Invoke when user wants to save a webpage as Markdown or convert a URL to readable text."

URL2Markdown — 网页转Markdown转换器

Overview | 概述

Converts any webpage URL into a clean, readable Markdown document with all images saved locally. 将任何网页URL转换为干净、易读的Markdown文档,所有图片会保存到本地。

Features | 功能:

  • Extracts main content and removes noise (ads, navigation, etc.) | 提取主要内容,去除噪音(广告、导航等)
  • Preserves document structure (headings, paragraphs, lists, code blocks, tables, blockquotes) | 保留文档结构(标题、段落、列表、代码块、表格、引用)
  • Downloads all images and embeds them as relative paths | 下载所有图片并保存为相对路径引用
  • Extracts metadata (title, description, author, date) and saves as YAML frontmatter | 提取元数据(标题、描述、作者、日期)并保存为YAML frontmatter
  • Handles srcset for high-resolution images | 处理srcset以获取高分辨率图片
  • Auto-generates timestamped filenames | 自动生成带时间戳的文件名

Usage | 使用方法

Invoke | 调用

python url2markdown.py <url> [output_directory]

Examples | 示例

Basic usage | 基本用法:

python url2markdown.py https://www.0xkato.xyz/how-llms-actually-work

With custom output directory | 自定义输出目录:

python url2markdown.py https://www.0xkato.xyz/how-llms-actually-work ./my_articles

Without https:// prefix | 不带https://前缀:

python url2markdown.py www.example.com/my-article

Output | 输出

The script generates a directory structure like this:

output/
├── how-llms-actually-work_20260615_143022.md
└── images/
    ├── img_000.png
    ├── img_001.jpg
    └── img_002.webp

The Markdown file includes:

  • YAML frontmatter with metadata | 带元数据的YAML frontmatter
  • Clean Markdown content | 干净的Markdown内容
  • Image references as relative paths | 图片引用为相对路径
  • Footer with source URL and generation info | 包含来源URL和生成信息的页脚

Metadata in Frontmatter | Frontmatter中的元数据

---
title: "Page Title | 页面标题"
url: "https://example.com/page"
date: "2026-06-15 14:30:22"
description: "Page description | 页面描述"
author: "Author Name | 作者"
published: "2026-01-15T10:00:00Z"
---

Dependencies | 依赖

  • Python 3.6+
  • requests — HTTP requests
  • beautifulsoup4 — HTML parsing

Auto-installs on first run if missing. 首次运行时会自动安装所需依赖。

How It Works | 工作原理

  1. Fetch the webpage with a browser-like User-Agent | 使用浏览器User-Agent获取网页
  2. Parse the HTML and extract metadata (title, description, author, dates) | 解析HTML并提取元数据
  3. Locate main content area (main, article, or content div) | 定位主内容区域(main、article或content div)
  4. Extract all images, handling srcset for higher resolution | 提取所有图片,处理srcset以获取更高分辨率
  5. Download images to local images/ directory | 下载图片到本地images目录
  6. Convert content to Markdown, preserving structure | 将内容转换为Markdown,保留结构
  7. Generate the final Markdown file with frontmatter and footer | 生成包含frontmatter和页脚的最终Markdown文件

Supported HTML Elements | 支持的HTML元素

Element Markdown 说明
<h1>-<h6> #-###### 标题
<p> (text) 段落
<ul>, <ol> - item, 1. item 列表
<pre><code> python ... 代码块
<blockquote> > text 引用
<table> col1 \| col2 表格
<img> ![alt](path) 图片
<hr> --- 分隔线
<a> (text) 链接(保留文字,去除链接)

Tips | 技巧

  • For JavaScript-rendered pages (SPA/React/Vue), content may be incomplete. Use browser dev tools to get the API response or use a headless browser alternative. | 对于JavaScript渲染的页面(SPA/React/Vue),内容可能不完整。使用浏览器开发者工具获取API响应或使用无头浏览器替代方案。
  • Images from CDNs are downloaded and saved locally with sequential numbering. | 来自CDN的图片会被下载并保存到本地,按顺序编号。
  • Large pages with many images may take longer. The script handles errors gracefully and continues. | 图片较多的长页面可能需要更长时间。脚本会优雅地处理错误并继续执行。
  • Default output directory is ./output. You can change it by providing a second argument. | 默认输出目录为./output,可以通过提供第二个参数来更改。

Error Handling | 错误处理

  • Network errors: prints error and exits | 网络错误:打印错误并退出
  • Missing images: prints warning and continues | 缺失图片:打印警告并继续
  • Invalid URLs: auto-adds https:// prefix | 无效URL:自动添加https://前缀
  • Failed downloads: skips the image, continues processing | 下载失败:跳过该图片,继续处理

当前收录版本

1.0.1

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 解决网页内容保存与离线阅读的高频刚需,功能闭环完整
  • 支持图片本地保存、元数据提取、结构保留,实用性强
触发精准90/100

亮点

  • 触发描述清晰,覆盖多种 URL 格式变体,边界明确
结构规范95/100

亮点

  • 文档结构完整,包含工作原理、示例、错误处理等关键章节
  • frontmatter 规范,示例详实,排版清晰
执行可靠90/100

亮点

  • 依赖管理完善,支持自动安装
  • 错误处理覆盖网络、图片、URL 等常见异常场景
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • example.com
  • www.0xkato.xyz

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

Python 3.6+ `requests` — HTTP requests `beautifulsoup4` — HTML parsing Auto-installs on first run if missing. 首次运行时会自动安装所需依赖。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。