跳到正文

网页转 Markdown 归档

把网页正文保存成 Markdown,处理页面加载与资料归档所需的信息。

开源精选知识加工52 个文件26,681 Stars浏览次数 0JimLiu/baoyu-skills MIT版本 1567581
开始使用

下载前阅读 SKILL.md 中的使用条件,并确认所用工具支持对应能力。

输入资料
目标页面地址 保存目录与读取条件 阅读本节完整说明
交付内容
Markdown 资料 来源与随附内容 阅读本节完整说明
  1. 获取完整包,保留配套文件的目录结构。
  2. 按照原文准备所需工具、依赖与输入资料。
  3. 阅读对应使用步骤与输入输出说明,在自己的环境中验证结果。

使用提示摘自原文,配套文件保留来源版本;实际运行条件以各包说明为准。

正文

获取原文件

references/adapters.md

Read when choosing an adapter, handling media, or answering adapter-specific questions.

Built-in Adapters

Adapter URLs Key Features
x x.com, twitter.com Tweets, threads, X Articles, media, login detection
youtube youtube.com, youtu.be Transcript/captions, chapters, cover image, metadata
hn news.ycombinator.com Threaded comments, story metadata, nested replies
generic Any URL (fallback) Defuddle extraction, Readability fallback, auto-scroll, network idle detection

Adapter is auto-selected based on URL. Override with --adapter <name>.

YouTube

  • Extracts transcripts/captions when available
  • Transcript format: [MM:SS] Text segment with chapter headings
  • Availability depends on YouTube exposing a caption track; videos with captions disabled or restricted playback may produce description-only output
  • Use --wait-for force if the page needs time to finish loading player metadata

X/Twitter

  • Extracts single tweets, threads, and X Articles
  • Auto-detects login state; if logged out and content requires auth, JSON output shows "status": "needs_interaction"
  • Use --wait-for interaction for login-protected content

Hacker News

  • Parses threaded comments with proper nesting and reply hierarchy
  • Includes story metadata (title, URL, author, score, comment count)
  • Shows comment deletion/dead status

Media Download Workflow

Driven by download_media in EXTEND.md:

Setting Behavior
1 (always) Run CLI with --download-media --output <path>
0 (never) Run CLI with --output <path> (no media download)
ask (default) Follow the ask-each-time flow below

Ask-Each-Time Flow

  1. Run the CLI without --download-media with --output <path> → markdown saved
  2. Check the saved markdown for remote media URLs (https:// in image/video links)
  3. If no remote media found → done, no prompt needed
  4. If remote media found → ask via AskUserQuestion:
    • header: "Media", question: "Download N images/videos to local files?"
    • "Yes" — Download to local directories
    • "No" — Keep remote URLs
  5. If the user confirms → run the CLI again with --download-media --output <same-path> (overwrites markdown with localized links)

Media Layout

When --download-media is enabled:

  • Images → imgs/ next to the output file (or --media-dir)
  • Videos → videos/ next to the output file (or --media-dir)
  • Markdown media links are rewritten to local relative paths

Output Format

Markdown to stdout (or file with --output).

JSON output (--format json) returns structured data:

  • adapter — which adapter handled the URL
  • status — "ok" or "needs_interaction"
  • login — login state detection (logged_in, logged_out, unknown)
  • interaction — interaction gate details (kind, provider, prompt)
  • document — structured content (url, title, author, publishedAt, content blocks, metadata)
  • media — collected media assets with url, kind, role
  • markdown — converted markdown text
  • downloads — media download results (when --download-media used)

CONTACT HAONAN

联系haonan

医疗 AI · 产品与独立开发

刘浩南

关注医疗 AI 从 demo 到真实落地,聚焦产品化、商业化与院内工作流效率提升。

12年医疗产研经验,大湾区头部医疗AI公司前产品总监,独立开发者

医疗 AI 产品化医疗 AI 商业化院内工作流效率
刘浩南的微信联系二维码
微信扫一扫,联系 haonan