# KB Zhihu Content Skill **kb-zhihu-content** - Download Zhihu videos and extract content. ## Features - Video download using **yt-dlp** - Subtitle extraction (returns no subtitle, triggers Whisper) - Supports `ZHIHU_COOKIE` environment variable ## Environment Variables | Variable | Required | Description | |----------|----------|-------------| | `ZHIHU_COOKIE` | No | 知乎登录 Cookie (for member-only videos) | ## Commands ```bash # Download video python zhihu_content.py --id "12345678" --type video --output "/path/to/downloads/" # Extract subtitle (returns no subtitle, triggers Whisper) python zhihu_content.py --id "12345678" --type subtitle --output "/path/to/subtitles/" ``` ## Output ```json { "success": true, "type": "video", "filename": "video_title.mp4", "filepath": "/path/to/downloads/video_title.mp4", "message": "下载完成: video_title.mp4" } ``` ## Installation ```bash # Already included in kb-skills repo # Ensure yt-dlp is installed pip install yt-dlp aiohttp ``` ## How It Works Video download uses **yt-dlp**: 1. Parses `ZHIHU_COOKIE` environment variable (optional) 2. Creates temporary Netscape-format cookie file 3. Runs `yt-dlp -f best -o ` 4. Cleans up temporary file ## Notes - 知乎视频通常没有官方字幕,将自动触发 Whisper 语音识别 - 视频下载需要能访问知乎(可能需要代理)