Skip to content
FunCoding

Search

Search docs, Skills and MCP

zhihu-transcribe

知乎视频 → 下载 → 转录 → 存为 Markdown。 支持知乎视频链接、问答内嵌视频和专栏文章,无需登录。

文档与办公1.2kzhihu-transcribe/SKILL.md

Install

Send this to Claude Code, Codex or Cursor. The agent checks the Skill for safety first and installs it only after you confirm.

读取 https://funcoding.ai/skills/chubbyguan/chubbyskills/zhihu-transcribe/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

知乎视频转录 Skill

将知乎视频下载音频,用 SenseVoice-Small 转录为文字,存为带 frontmatter 的 Markdown 文件。

环境要求

# Python 3.9+
python -m venv .venv
source .venv/bin/activate

# 依赖
pip install funasr modelscope torch torchaudio

# 系统依赖
# macOS: brew install ffmpeg yt-dlp
# Ubuntu: sudo apt install ffmpeg && pip install yt-dlp

使用方法

# 独立视频页
python scripts/transcribe.py "https://www.zhihu.com/video/1234567890"

# 问答内嵌视频(脚本自动提取视频 ID)
python scripts/transcribe.py "https://www.zhihu.com/question/12345/answer/67890"

# 专栏文章(内嵌视频会被提取)
python scripts/transcribe.py "https://zhuanlan.zhihu.com/p/123456"

# 指定输出目录
python scripts/transcribe.py "https://www.zhihu.com/video/1234567890" -o ./output

流程

Step 1: yt-dlp 下载音频

知乎视频页、问答页和专栏文章的链接形态不同,脚本统一交给 yt-dlp 解析。Referer + UA 伪装可规避基础反爬。

yt-dlp --extract-audio --audio-format mp3 --audio-quality 128K \
  --user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ..." \
  --referer "https://www.zhihu.com/" \
  "https://www.zhihu.com/video/1234567890"

Step 2: SenseVoice-Small 转录

from funasr import AutoModel

model = AutoModel(
    model="iic/SenseVoiceSmall",
    trust_remote_code=True,
    vad_model="fsmn-vad",
    vad_kwargs={"max_single_segment_time": 30000},
    device="cpu",
)

result = model.generate(
    input=audio_path,
    language="zh",
    use_itn=True,
    batch_size_s=60,
)

Step 3: 生成 Markdown

脚本自动创建带 frontmatter 的 Markdown 文件,包含来源链接、标题、语言和转录文本。下载失败会自动重试。

已知限制

  • 内嵌视频:问答和专栏中的内嵌视频依赖 yt-dlp 正确提取视频 ID;若页面结构变化可能导致提取失败
  • 反爬:知乎对频繁请求有限流;脚本已内置重试,建议单次处理间隔不少于 3 秒
  • 登录态:盐选内容、仅会员可见视频需要登录,当前脚本不携带登录态
  • 语言:知乎以中文为主,脚本默认 language=zh;英文内容建议改用 youtube-transcribe
  • 模型大小:SenseVoice-Small 首次下载约 893MB

致谢

⚖️ 合规声明

仅供个人学习与研究使用。请遵守目标平台的服务条款(ToS)与 robots 规则,控制请求频率,不要用于批量抓取、商用爬取或侵犯他人权益的场景。下载内容的版权归原作者所有。

Similar Skills

pdf
anthropics/skills180k

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

Docs & office

discernment-nudge
anthropics/skills180k

discernment-nudge

After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.

Docs & office

doc-coauthoring
anthropics/skills180k

doc-coauthoring

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

Docs & office

docx
anthropics/skills180k

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

Docs & office

pptx
anthropics/skills180k

pptx

Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.

Docs & office

canvas-design
anthropics/skills180k

canvas-design

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

Docs & office