bilibili-page-reader
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.
npx skills add Misaka-Mikoto-Tech/agent-skills --skill bilibili-page-reader --agent codex
Same command for any agent — swap --agent for claude-code, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Bilibili Page Reader ## Core Rules - **Browser access** via `kimi-webbridge` for 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.exe` and Python's requests both get blocked by Bilibili CDN TLS fingerprinting on this platform. --- ## Workflow Overview ``` ┌─ BE downloadSubtitles provider ──→ 投稿字幕 (timestamps) │ BiliBili video ───┼─ BE downloadDanmaku provider ────→ danmaku density/peaks/sample │ └─ No subtitles? ──→ Audio transcription fallback 1. Get audio stream URL (Node.js → playurl API) 2. Download .m4s audio 3. ffmpeg → .m4a 4. FunASR paraformer-zh → SRT with timestamps ``` --- ## Phase 1: Subtitles (preferred — via BE) Use the one-shot evaluate below. It returns both subtitles and danmaku in a single call. ### Setup ```bash ~/.kimi-webbridge/bin/kimi-webbridge status ``` ```json {"action":"navigate","args":{"url":"https://www.bilibili.com/video/BV.../","newTab":true}
- Core Rules
- Workflow Overview
- Phase 1: Subtitles (preferred — via BE)
- Setup
- One-shot evaluate
- Response shape
- Phase 2: Audio Transcription Fallback (when no subtitles exist)
- Why this approach
- Step 1: Get audio stream URL via Node.js
- 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 audio2srt.py script
node -e "
const https = require('https');
const url = 'https://api.bilibili.com/x/player/playurl' +
let data = '';
const d = JSON.parse(data);
if (d.code === 0 && d.data && d.data.dash && d.data.dash.audio) {
const audio = d.data.dash.audio;
const best = audio.reduce((a,b) => a.bandwidth > b.bandwidth ? a : b);
const fs = require('fs');
const url = 'BACKUP_URL_FROM_STEP_1';What does the bilibili-page-reader skill do?
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.
How do I install it?
Run `npx skills add Misaka-Mikoto-Tech/agent-skills --skill bilibili-page-reader --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From Misaka-Mikoto-Tech/agent-skills, a repository with 213 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
