Tooluck logoTooluck
SKILL.md

weibo-transcribe

Agent skill fromchubbyguan/chubbyskills

微博视频 → 下载 → 转录 → 存为 Markdown。 支持 weibo.com 和 m.weibo.cn 链接,无需登录。

How to install weibo-transcribe

install weibo-transcribe
# install the chubbyskills pack with the skills CLI
npx skills add chubbyguan/chubbyskills

# or add only this skill to Claude Code: copy the folder

weibo-transcribe/

# into

~/.claude/skills/weibo-transcribe/ (all projects)

.claude/skills/weibo-transcribe/ (one project)

weibo-transcribe/SKILL.md

MITFull file
1# 微博视频转录 Skill
2
3将微博视频下载音频,用 SenseVoice-Small 转录为文字,存为带 frontmatter 的 Markdown 文件。
4
5## 环境要求
6
7```bash
8# Python 3.9+
9python -m venv .venv
10source .venv/bin/activate
11
12# 依赖
13pip install funasr modelscope torch torchaudio
14
15# 系统依赖
16# macOS: brew install ffmpeg yt-dlp
17# Ubuntu: sudo apt install ffmpeg && pip install yt-dlp
18```
19
20## 使用方法
21
22```bash
23# 桌面端链接
24python scripts/transcribe.py "https://weibo.com/xxxxx"
25
26# 移动端链接(更稳定)
27python scripts/transcribe.py "https://m.weibo.cn/xxxxx"
28
29# 指定输出目录
30python scripts/transcribe.py "https://m.weibo.cn/xxxxx" -o ./output
31```
32
33## 流程
34
35### Step 1: yt-dlp 下载音频
36
37微博对桌面端 UA 拦截较严,脚本自动使用移动端 UA + Referer 伪装。优先用 `m.weibo.cn` 链接,成功率更高。
38
39```bash
40yt-dlp --extract-audio --audio-format mp3 --audio-quality 128K \
41 --user-agent "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) ..." \
42 --referer "https://m.weibo.cn/" \
43 "https://m.weibo.cn/status/example"
44```
45
46### Step 2: SenseVoice-Small 转录
47
48```python
49from funasr import AutoModel
50
51model = AutoModel(
52 model="iic/SenseVoiceSmall",
53 trust_remote_code=True,
54 vad_model="fsmn-vad",
55 vad_kwargs={"max_single_segment_time": 30000},
56 device="cpu",
57)
58
59result = model.generate(
60 input=audio_path,
61 language="zh",
62 use_itn=True,
63 batch_size_s=60,
64)
65```
66
67### Step 3: 生成 Markdown
68
69脚本自动创建带 frontmatter 的 Markdown 文件,包含来源链接、作者、语言和转录文本。下载失败会自动重试。
70
71## 已知限制
72
73- **链接形态**:桌面端 `weibo.com` 链接常被反爬拦截,优先使用 `m.weibo.cn` 移动端链接
74- **反爬**:微博对非移动端 UA 和缺失 Referer 的请求拦截较严;脚本已内置移动端 UA,但频繁请求仍可能触发限流
75…

Excerpt shown under the repository's MIT license.

More skills in chubbyskills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates