video-watcher

TotalClaw 作者 adapted from youtube-watcher v1.1.0

从 YouTube 和 Bilibili 视频中获取并阅读文字记录。当您需要总结视频、回答有关其内容的问题或从中提取信息时使用。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~donnycui-bilibili-youtube-watcher
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~donnycui-bilibili-youtube-watcher/file -o donnycui-bilibili-youtube-watcher.md
# 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)

```bash
python3 {baseDir}/scripts/get_transcript.py "VIDEO_URL"
```

### Specify Language

```bash
python3 {baseDir}/scripts/get_transcript.py "VIDEO_URL" --lang zh-CN
```

## Examples

### YouTube Video
```bash
python3 {baseDir}/scripts/get_transcript.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
```

### Bilibili Video
```bash
python3 {baseDir}/scripts/get_transcript.py "https://www.bilibili.com/video/BV1xx411c7mD"
```

### With Custom Language
```bash
# Get English subtitles for a Bilibili video
python3 {baseDir}/scripts/get_transcript.py "https://bilibili.com/video/..." --lang en

# Get Chinese subtitles for a YouTube video
python3 {baseDir}/scripts/get_transcript.py "https://youtube.com/watch?v=..." --lang zh-CN
```

## Default Languages

| Platform | Default Language |
|----------|-----------------|
| YouTube  | `en` (English)  |
| Bilibili | `zh-CN` (Chinese) |

## Common Language Codes

- `en` - English
- `zh-CN` - Simplified Chinese (简体中文)
- `zh-TW` - Traditional Chinese (繁體中文)
- `ja` - Japanese
- `ko` - Korean
- `es` - Spanish
- `fr` - French
- `de` - 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

---

## 中文说明

# Video Watcher

从 **YouTube** 和 **Bilibili** 视频中获取文字记录,以支持内容总结、问答和信息提取。

## 支持的平台

- ✅ **YouTube**(youtube.com、youtu.be)
- ✅ **Bilibili**(bilibili.com、b23.tv)

## 用法

### 获取文字记录(自动检测平台)

```bash
python3 {baseDir}/scripts/get_transcript.py "VIDEO_URL"
```

### 指定语言

```bash
python3 {baseDir}/scripts/get_transcript.py "VIDEO_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
# Get English subtitles for a Bilibili video
python3 {baseDir}/scripts/get_transcript.py "https://bilibili.com/video/..." --lang en

# Get Chinese subtitles for a YouTube video
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