# bilibili-all-in-one

Adopt this skill: https://proskills.md/skills/other/little-jax-bilibili-all-in-one

Page: https://proskills.md/skills/other/little-jax-bilibili-all-in-one
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: README.md
upstream: https://github.com/little-jax/bilibili-all-in-one/blob/HEAD/README.md

````text

<p align="center">
  <h1 align="center">🎬 Bilibili All-in-One</h1>
  <p align="center">一站式 B站工具箱 — 热门监控 · 视频下载 · 数据追踪 · 字幕提取 · 视频播放 · 投稿发布</p>
</p>

<p align="center">
  <img src="https://img.shields.io/badge/python-%3E%3D3.8-blue?logo=python&logoColor=white" />
  <img src="https://img.shields.io/badge/license-MIT--0-green" />
  <img src="https://img.shields.io/badge/version-1.0.18-orange" />
  <img src="https://img.shields.io/badge/platform-Bilibili-pink" />
</p>

---

> Fork / ownership note:
> - Current maintained version in this workspace: **Little Jax / Mozi A.**
> - Published fork / reference repo: **https://github.com/little-jax/bilibili-all-in-one**
> - Original upstream author: **wscats**
> - Upstream source is preserved for attribution; this workspace copy is now independently maintained and extended.

## 🚀 Why this fork is powerful

This is not just a bag of Bilibili scripts anymore. The maintained OpenClaw fork now behaves like a compact creator-ops platform:

- **Creator operations**: followers, comments, moderation, dynamics, space notice, and authenticated account workflows
- **Inbox / DM surface**: replies, mentions, likes, sessions, DM history, inbox digests, priority filtering, and automation snapshots
- **Search + entity resolution**: resolve BV / UID / opus / dynamic / note / article targets into normalized objects
- **Creator intelligence**: investigate a user with profile, recent content, creator metrics, audience-fit hints, and a compact briefing
- **Reply preparation**: build thread-aware `reply_guidance` and `candidate_reply_input` that downstream agents can actually use
- **Operator triage**: classify inbound intent, estimate urgency, suggest tone, and flag review-required cases
- **Reply execution loop**: `operator_decision_loop` → `draft_reply_candidate` → `send_or_queue_reply`
- **Safe public auto-send**: DMs can send directly; public reply auto-send only fires when thread mapping is proven from reply metadata
- **Automation-facing workflows**: `automation_brief` and `automation_tick` give cron/sub-agent friendly snapshots and next-action queues
- **Live orchestration**: Bilibili live preflight/start/stop, RTMP retrieval validation, OBS websocket control, room-profile inspection, announcement updates, pre-start patch planning, and stop-session summary stats (`StopLiveData`)
- **Dashboard / analytics**: KPI snapshots, reply target ranking, task queues, and content opportunity briefs
- **Asset surfaces**: video favorite folders, watch-later, and channel-series collections
- **Native emoji surface**: inspect and suggest built-in Bilibili emoji packs for more natural-feeling replies/DMs
- **Content-object surface**: treat dynamics, opus, notes, and articles as first-class objects instead of URL crumbs, including unified image extraction (`images`, `primary_image`) for better reply context
- **Unified discovery surface**: homepage feed, hot videos, rank, and topic workflows behind one client instead of scattered modules
- **Productized outputs**: high-level workflows expose stable schema tags like `bilibili.client_workflows.<action>.v1`

In short: it now feels like a real operator-facing skill, not a random endpoint wrapper.

## Quick Power Showcase

```bash
# Investigate a creator with profile + recent content + creator metrics
python main.py client_workflows investigate_user '{"uid": 434156493, "include_creator_metrics": true, "period": "week"}'

# Inspect / patch / run live orchestration
python main.py live_orchestrator get_live_room_profile
python main.py live_orchestrator pre_start_room_patch '{"announcement": "今晚八点，来。", "area_id": 216}'
python main.py live_orchestrator prepare_live_session '{"obs_host": "127.0.0.1", "obs_port": 4455, "obs_password": "..."}'
python main.py live_orchestrator start_live_session '{"obs_host": "127.0.0.1", "obs_port": 4455, "obs_password": "...", "auto_start_obs": true}'
python main.py live_orchestrator stop_live_session '{"live_key": "<live_key>", "obs_host": "127.0.0.1", "obs_port": 4455, "obs_password": "..."}'

# Build reply-ready context from the latest reply thread
python main.py client_workflows prepare_reply_context '{"source": "reply", "limit": 3}'

# Classify inbound intent and produce operator triage
python main.py client_workflows classify_inbound_intent '{"text": "想合作推广一下这个项目", "target": "https://www.bilibili.com/video/BV1KQPyzcEhH"}'
python main.py client_workflows operator_triage '{"source": "reply", "limit": 5}'
python main.py client_workflows operator_decision_loop '{"source": "reply", "limit": 5, "text": "想合作推广一下这个项目"}'
python main.py client_workflows draft_reply_candidate '{"source": "reply", "limit": 5, "text": "想合作推广一下这个项目"}'
python main.py client_workflows send_or_queue_reply '{"source": "reply", "limit": 5, "text": "想合作推广一下这个项目", "execute_send": false, "force_public_send": true}'
python main.py client_workflows reply_preview_card '{"source": "reply", "limit": 5, "text": "想合作推广一下这个项目", "force_public_send": true}'
python main.py client_workflows approve_and_send_reply '{"approved": true, "source": "reply", "limit": 5, "text": "想合作推广一下这个项目", "force_public_send": true}'

# Cron / agent friendly automation snapshot
python main.py client_workflows automation_brief '{"period": "week", "max_items": 5, "priority_threshold": 80}'
python main.py client_workflows automation_tick '{"period": "week", "max_items": 5, "priority_threshold": 80, "mode": "review"}'

# Build dashboard / queue / opportunity views
python main.py client_workflows creator_dashboard_snapshot '{"period": "week", "max_items": 5}'
python main.py client_workflows creator_task_queue '{"period": "week", "max_items": 5}'
python main.py client_workflows content_opportunity_brief '{"period": "week", "max_items": 5}'

# Work with account assets
python main.py asset_client list_video_favorite_lists '{"uid": 434156493}'
python main.py asset_client get_video_favorite_list_content '{"media_id": 123456}'
python main.py asset_client list_watch_later
python main.py emoji_client suggest_emojis '{"business": "reply", "query": "doge", "limit": 5}'
python main.py content_client list_user_dynamics '{"uid": 434156493}'
python main.py content_client list_user_articles '{"uid": 434156493}'
python main.py discovery_client discovery_snapshot
python main.py discovery_client get_hot '{"page_size": 5}'
```

## 📖 简介

**Bilibili All-in-One** 是一个综合性的 B站工具包，将 6 个独立的 B站技能整合为一个统一的 Skill，提供从热门监控到视频投稿的全链路能力。

支持作为 **AI Agent 技能**、**命令行工具** 或 **Python 库** 使用。

## ✨ 功能总览

| 模块 | 功能 | 是否需要登录 |
|:---:|---|:---:|
| 🔥 **热门监控** | 热门视频、热搜话题、每周必看、分区排行榜 | ❌ |
| ⬇️ **视频下载** | 多清晰度下载、批量下载、格式转换、音频提取 | ⚠️ 高清需要 |
| 👀 **数据追踪** | 播放/点赞/收藏统计、数据追踪、多视频对比 | ❌ |
| 📝 **字幕提取** | 字幕下载、格式转换（SRT/ASS/VTT/TXT）、多语言、字幕合并 | ❌ |
| ▶️ **视频播放** | 播放地址获取、弹幕抓取、分P/播放列表信息 | ⚠️ 高清需要 |
| 📤 **视频发布** | 上传投稿、定时发布、草稿管理、编辑视频 | ✅ 必须 |
| 🗂️ **资产面** | 收藏夹、稍后再看、合集/系列管理 | ⚠️ 需要账号 |
| 🔐 **认证工作流** | QR 登录、登录状态检查、会话清理、持久化控制 | ⚠️ 推荐 QR |

## 🚀 快速开始

### 环境要求

- **Python** >= 3.8
- **ffmpeg**（可选，用于合并视频/音频流）

### 安装依赖

```bash
# Maintained fork / reference repo
git clone https://github.com/little-jax/bilibili-all-in-one.git
cd bilibili-all-in-one
pip install -r requirements.txt
```

> This workspace version is a maintained fork/adaptation. If you are working inside Mozi's OpenClaw workspace, prefer the local checked-out copy rather than recloning upstream.

### 30 秒上手

```python
import asyncio
from main import BilibiliAllInOne

app = BilibiliAllInOne()

async def main():
    # 获取 B站热门视频
    hot = await app.execute("hot_monitor", "get_hot", page_size=5)
    print(hot)

asyncio.run(main())
```

## 🔐 Auth Productization

QR login is the preferred path. Default behavior is to generate a QR image and send/show that image directly. Only fall back to HTML / local page / raw URL / other presentation methods when the current session cannot display images or the user explicitly asks for another path.

High-value auth actions:

- `auth_client start_qr_login` → generate QR assets (`image_path`, `html_path`, `qr_u
````
