Files
jackwener__opencli/docs/adapters/browser/bilibili.md
Ray b92755597c feat(bilibili): add video command (#1110)
* feat(bilibili): add video command

Add `opencli bilibili video <bvid|url|short-link>` to fetch one
video's metadata via the public /x/web-interface/view endpoint.

Returns title, author, category, publish time, duration, view /
danmaku / reply / like / coin / favorite / share counts, parts,
thumbnail, and description as a key/value table.

Reuses `resolveBvid` and `apiGet` from clis/bilibili/utils.js to
stay consistent with the existing bilibili adapters
(subtitle/search/etc. all follow the same navigate + apiGet
pattern). Non-zero API codes surface as CommandExecutionError.

Fills a visible gap: existing bilibili commands cover search,
hot, subtitle, ranking, user-videos etc., but nothing returned
metadata for a single video — `web read` only gets a DOM shell.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(manifest): register bilibili video command

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: jackwener <jakevingoo@gmail.com>
2026-04-21 15:58:32 +08:00

2.2 KiB

Bilibili

Mode: 🔐 Browser · Domain: bilibili.com

Commands

Command Description
opencli bilibili hot
opencli bilibili search
opencli bilibili me
opencli bilibili favorite Read your first favorite folder, or a specific folder with --fid
opencli bilibili history
opencli bilibili feed Read the following feed, or a specific user's dynamics by uid/name
opencli bilibili feed-detail Read one dynamic in detail, including exclusive content
opencli bilibili subtitle
opencli bilibili video Get one video's metadata (title, author, duration, stats) by BV / URL / b23.tv link
opencli bilibili dynamic
opencli bilibili ranking
opencli bilibili following
opencli bilibili user-videos
opencli bilibili download

Usage Examples

# Quick start
opencli bilibili hot --limit 5

# Search videos
opencli bilibili search 黑神话 --limit 10

# Read one creator's videos
opencli bilibili user-videos 2 --limit 10

# Read your first favorite folder
opencli bilibili favorite --limit 10

# Read a specific favorite folder
opencli bilibili favorite --fid 123456789 --limit 10

# Read following feed
opencli bilibili feed --limit 10

# Read one user's dynamics by UID
opencli bilibili feed 2 --limit 10

# Read one user's dynamics by username and paginate
opencli bilibili feed 老番茄 --pages 2 --type video

# Read one dynamic in detail
opencli bilibili feed-detail 1234567890123456789

# Fetch subtitles
opencli bilibili subtitle BV1xx411c7mD --lang zh-CN

# Inspect one video's metadata
opencli bilibili video BV1xx411c7mD
opencli bilibili video https://www.bilibili.com/video/BV1xx411c7mD/

# JSON output
opencli bilibili hot -f json

# Verbose mode
opencli bilibili hot -v

Prerequisites

Notes

  • opencli bilibili feed without uid reads your following feed
  • opencli bilibili feed <uid-or-name> reads a specific user's dynamics
  • opencli bilibili favorite defaults to the first favorite folder when --fid is omitted
  • feed-detail expects the dynamic ID from a https://t.bilibili.com/<id> URL