bilibili-source

Fetch login-free metadata, live stats, and danmaku from Bilibili videos via API scripts.

1.4k|216|Updated Oct 22, 2025
One-click install
npx skills add https://github.com/daymade/claude-code-skills --skill bilibili-source
Or copy as Structured Prompt for Agentā–¼
Please help me install this Agent Skill.
Skill: bilibili-source
Source: https://github.com/daymade/claude-code-skills/tree/main/bilibili-source
Command: npx skills add https://github.com/daymade/claude-code-skills --skill bilibili-source

SYSTEM DOCUMENTATION & REQUIREMENTS

šŸ’” This Skill requires curl, jq, python3, yt-dlp, and includes scripts (resource) and references (resource) components.

What problem does it solve?

When citing Bilibili video metrics in analyses, knowledge bases, or case studies, hand-typed or estimated numbers silently go stale and corrupt the data. This Skill fetches real, verifiable video data directly from the Bilibili API so every number is citable with a fetch timestamp.

Core Features & Use Cases

  • Full metadata and live stats in one call: title, UP name and follower count, publish date, partition, tags, per-part cids, and view/like/coin/favorite/share/reply/danmaku counts, accepting BVID, av numbers, b23.tv short links, or full URLs.
  • Danmaku extraction: download the full bullet-comment text of any video part to analyze where and how audiences reacted.
  • Subtitles and favorites with login: pull subtitle tracks via browser cookies and enumerate favorites folders, with the login requirement clearly enforced rather than bypassed.
  • Use Case: Writing a performance analysis of a Bē«™ video — run one command to get its exact play count, likes, and favorites with a timestamp, then pull the danmaku to see what viewers actually said.

Quick Start

Ask the AI to fetch the real stats and metadata for a Bilibili video by pasting its URL, BV number, av number, or b23.tv short link.

Frequently Asked Questions about bilibili-source

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get real view and like counts for a Bilibili video?ā–¼

Run scripts/bili-fetch.sh with the video's BVID, av number, b23.tv link, or full URL. It returns one JSON object with the stat block (view, like, coin, favorite, share, reply, danmaku) plus a fetched_at timestamp you should cite alongside the numbers.

How to download danmaku comments from a Bilibili video?ā–¼

Use scripts/bili-danmaku.sh with the video reference and an optional part number. It resolves the part's cid, fetches the raw-deflate danmaku XML from the list.so endpoint, and outputs one comment per line without requiring login.

Can I get Bilibili subtitles without logging in?ā–¼

No. Subtitles are login-gated: the player API returns an empty subtitle list for anonymous requests, verified across many videos. Use scripts/bili-subs.sh with your browser cookies, or the documented SESSDATA API path, and ask the user before reading their session.

Does the Bilibili API work behind a local proxy?ā–¼

Local forward proxies like 127.0.0.1 break Bilibili requests since it is a domestic CN service. The scripts strip proxy environment variables per request; for Python urllib you must also pass an explicit empty ProxyHandler to avoid macOS system-proxy fallback.

Why do fetched Bilibili view counts change between runs?ā–¼

Engagement metrics are live snapshots that drift minute to minute, so re-fetching the same video can show slightly different numbers. This is expected behavior, not an error — always cite the fetched_at timestamp with any metric.

How do I handle multi-part Bilibili videos when fetching data?ā–¼

The fetch script returns a pages array with each part's own cid, page number, title, and duration. Danmaku and subtitles are fetched per cid, so use the specific part's cid from pages rather than the top-level cid, which only covers part one.