Video Watcher
Fetch transcripts from YouTube and Bilibili videos to enable summarization, QA, and content extraction.
Supported Platforms
- - ✅ YouTube (youtube.com, youtu.be)
- ✅ Bilibili (bilibili.com, b23.tv)
Usage
Get Transcript (Auto-detect Platform)
CODEBLOCK0
Specify Language
CODEBLOCK1
Examples
YouTube Video
CODEBLOCK2
Bilibili Video
CODEBLOCK3
With Custom Language
CODEBLOCK4
Default Languages
| Platform | Default Language |
|---|
| YouTube | INLINECODE0 (English) |
| Bilibili |
zh-CN (Chinese) |
Common Language Codes
- -
en - English - INLINECODE3 - Simplified Chinese (简体中文)
- INLINECODE4 - Traditional Chinese (繁體中文)
- INLINECODE5 - Japanese
- INLINECODE6 - Korean
- INLINECODE7 - Spanish
- INLINECODE8 - French
- INLINECODE9 - German
Notes
- - Requires
yt-dlp to be installed and available in PATH - Works with videos that have closed captions (CC) or auto-generated subtitles
- Automatically detects platform from URL
- If no subtitles available, the script will fail with an error message
- yt-dlp natively supports both YouTube and Bilibili
视频观看器
从 YouTube 和 Bilibili 视频中获取转录文本,支持摘要生成、问答和内容提取。
支持的平台
- - ✅ YouTube (youtube.com, youtu.be)
- ✅ Bilibili (bilibili.com, b23.tv)
使用方法
获取转录文本(自动检测平台)
bash
python3 {baseDir}/scripts/get_transcript.py 视频URL
指定语言
bash
python3 {baseDir}/scripts/get_transcript.py 视频URL --lang zh-CN
示例
YouTube 视频
bash
python3 {baseDir}/scripts/get_transcript.py https://www.youtube.com/watch?v=dQw4w9WgXcQ
Bilibili 视频
bash
python3 {baseDir}/scripts/get_transcript.py https://www.bilibili.com/video/BV1xx411c7mD
自定义语言
bash
获取Bilibili视频的英文字幕
python3 {baseDir}/scripts/get_transcript.py https://bilibili.com/video/... --lang en
获取YouTube视频的中文字幕
python3 {baseDir}/scripts/get_transcript.py https://youtube.com/watch?v=... --lang zh-CN
默认语言
| 平台 | 默认语言 |
|---|
| YouTube | en(英语) |
| Bilibili |
zh-CN(简体中文) |
常用语言代码
- - en - 英语
- zh-CN - 简体中文
- zh-TW - 繁体中文
- ja - 日语
- ko - 韩语
- es - 西班牙语
- fr - 法语
- de - 德语
注意事项
- - 需要安装 yt-dlp 并确保其在 PATH 环境变量中
- 适用于带有隐藏字幕(CC)或自动生成字幕的视频
- 自动从 URL 检测平台
- 如果没有可用字幕,脚本将失败并显示错误信息
- yt-dlp 原生支持 YouTube 和 Bilibili