misaka-mikoto-tech/agent-skills/bilibili-page-reader
Claude Code and agent skill by misaka-mikoto-tech/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Get content from Bilibili videos: official subtitles, danmaku (density/peaks/sample), comments. When no subtitles exist (no 投稿字幕), fall back to downloading audio + ASR transcription via FunASR.
Install
npx vskill@latest install misaka-mikoto-tech/agent-skills/bilibili-page-readerSKILL.md
Bilibili Page Reader
Core Rules
- Browser access via
kimi-webbridgefor page state, login-only data, Bilibili Evolved (BE) providers. - Do not click BE download buttons. Call providers directly via evaluate.
- Always use a named session. A session-less evaluate may land on a different tab and silently return wrong data.
- Network calls outside the browser (audio download, playurl API) use Node.js — PowerShell's
curl.exeand Python's requests both get blocked by Bilibili CDN TLS fingerprinting on this platform.
Workflow Overview
Phase 1: Subtitles (preferred — via BE)
Use the one-shot evaluate below. It returns both subtitles and danmaku in a single call.
Setup
Wait 2–3 seconds for BE to fully initialize.
One-shot evaluate
Response shape
If sub.count === 0, no 投稿字幕 was available. Proceed to Phase 2 below.
Phase 2: Audio Transcription Fallback (when no subtitles exist)
Use when Phase 1 returns sub.count === 0. This replaces the old "AI subtitle API" fallback which is unreliable — the /x/player/v2 API often returns stale/empty subtitle data.
Why this approach
The Bilibili CDN uses TLS fingerprinting that blocks curl and Python requests. Reliable paths:
| Method | Works? | Notes | |
|---|---|---|---|
curl.exe with browser headers | ❌ Exit code 35 | SSL blocked | |
Python requests / urllib | ❌ Blocked | Same reason | |
Node.js https.get() | ✅ | Use User-Agent + Referer headers | |
| Browser fetch (in-page) | ✅ but evaluate timeout <1s | Only for fast API calls | |
| Node.js to download audio | ✅ | Backup URL is most stable |
Step 1: Get audio stream URL via Node.js
The fnval=4048 flag requests DASH format with separate audio/video streams.
Step 2: Download audio (use backup URL — most reliable)
Step 3: Convert to standard audio (stream copy, no re-encode)
Step 4: ASR transcription via FunASR
Step 5: Cleanup — remove intermediate audio files
The only artifacts worth keeping are the .srt subtitle file. The raw .m4s, the converted .m4a, and any .json debug output are all intermediate and should be cleaned up after the SRT is confirmed valid.
What the script does:
- Loads
paraformer-zh(Chinese ASR, 220M params) +fsmn-vad+ct-punc+cam++ - Outputs SRT with per-sentence timestamps via
res[0]["sentence_info"] - CPU perf: ~15x realtime (21 min audio ≈ 90 sec)
- Handles ModelScope cache/credential path setup automatically
If `cam++` is too slow to download, omit --spk-model and group res[0]["timestamp"] (per-character ms array) by punctuation boundaries manually.
If no `sentence_info` in the output: the spk_model triggers sentence segmentation. Without it, you only get raw text + per-character timestamps.
The audio2srt.py script
Located next to this SKILL.md file. Copy it into the current workspace or call it by its skill-directory path. It handles:
- Model loading with ModelScope credential path override (sandbox-safe)
- Multiple output formats: SRT, VTT, JSON
- Parsing
sentence_info,timestamp, and raw text fallback - Cleaning SenseVoice special tags (
<|zh|>,<|HAPPY|>, etc.) - Segment deduplication and time-sorting
After transcription completes, delete `*.m4s` and `*.m4a` — only the .srt is the final output.
Danmaku Fallback: Protobuf API (when BE's downloadDanmaku is absent)
If segment 1 has data and segment 2 is empty, treat segment 1 as complete. Apply the same density/peak/sample logic from Phase 1.
Comments
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/bilibili-page-reader/SKILL.md
Popularity
- Repository stars
- 273
- Repository forks
- 11
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/misaka-mikoto-tech/agent-skills/bilibili-page-reader)