Bilibili All In One
A comprehensive Bilibili toolkit that integrates hot trending monitoring, video downloading, video watching/playback, subtitle downloading, and video publish...
A comprehensive Bilibili toolkit that integrates hot trending monitoring, video downloading, video watching/playback, subtitle downloading, and video publish...
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
A comprehensive Bilibili toolkit that integrates hot trending monitoring, video downloading, video watching/playback, subtitle downloading, and video publishing capabilities into a single unified skill.
โ ๏ธ Optional Environment Variables:
,BILIBILI_SESSDATA(optional),BILIBILI_BILI_JCT(optional),BILIBILI_BUVID3(optional) These are sensitive Bilibili session cookies needed only for publishing and high-quality (1080p+/4K) downloads. Most features work WITHOUT any credentials: hot monitoring, standard-quality downloads, subtitle listing, danmaku, stats viewing.BILIBILI_PERSIST๐ฆ Install:
(all standard PyPI packages: httpx, aiohttp, beautifulsoup4, lxml, requests)pip install -r requirements.txt๐ Source: github.com/wscats/bilibili-all-in-one
ๅฝ็จๆทๆ็กฎ่ฏทๆฑไปฅไธ Bilibili ็ธๅ ณๆไฝๆถ๏ผๆฌ Skill ๅฏ่ขซๆฟๆดป๏ผ
| ่งฆๅๅบๆฏ | ๅน้ ็ๆจกๅ | ๅ ธๅ่งฆๅ่ฏ |
|---|---|---|
| ๆฅ็B็ซ็ญ้จใ็ญๆใๆ่กๆฆใๅฟ ็ๆฆ | ๐ฅ Hot Monitor | "็ญ้จ"ใ"็ญๆ"ใ"ๆ่ก"ใ"่ถๅฟ"ใ"ๅฟ ็"ใ"ๆต่ก"ใ"ๆฆๅ" |
| ไธ่ฝฝB็ซ่ง้ขใๆๅ้ณ้ขใๆน้ไธ่ฝฝ | โฌ๏ธ Downloader | "ไธ่ฝฝ"ใ"ไฟๅญ่ง้ข"ใ"ๆๅ้ณ้ข"ใ"ๅฏผๅบMP4"ใ"ๆน้ไธ่ฝฝ" |
| ๆฅ็่ง้ขๆญๆพ้ใ็น่ตๆฐใๆฐๆฎ่ฟฝ่ธชใๅฏนๆฏ | ๐ Watcher | "ๆญๆพ้"ใ"็น่ต"ใ"ๆฐๆฎ"ใ"็ป่ฎก"ใ"ๅฏนๆฏ"ใ"็ๆง"ใ"่ฟฝ่ธช"ใ"่ง็้" |
| ไธ่ฝฝๅญๅนใ่ฝฌๆขๅญๅนๆ ผๅผใๅๅนถๅญๅน | ๐ Subtitle | "ๅญๅน"ใ"CC"ใ"SRT"ใ"ASS"ใ"ๅญๅนไธ่ฝฝ"ใ"ๅญๅน่ฝฌๆข"ใ"็ฟป่ฏ" |
| ๆญๆพ่ง้ขใ่ทๅๅผนๅนใๆญๆพๅ่กจ | โถ๏ธ Player | "ๆญๆพ"ใ"ๅผนๅน"ใ"ๆญๆพๅฐๅ"ใ"ๅP"ใ"ๆญๆพๅ่กจ"ใ"danmaku" |
| ไธไผ ่ง้ขใๅๅธใๅฎๆถๅๅธใ่็จฟใ็ผ่พ | ๐ค Publisher | "ไธไผ "ใ"ๅๅธ"ใ"ๆ็จฟ"ใ"ๅฎๆถๅๅธ"ใ"่็จฟ"ใ"็ผ่พ่ง้ข" |
โ ๏ธ ๆณจๆ๏ผๆฌ Skill ไธไผไป ๅ ๆถๆฏไธญๅบ็ฐ Bilibili ้พๆฅๆ BV ๅทๅฐฑ่ชๅจๆฟๆดปใๅชๆๅฝ็จๆทๆ็กฎ่กจ่พพไบๆไฝๆๅพ๏ผๅฆ"ไธ่ฝฝ่ฟไธช่ง้ข"ใ"ๆฅ็็ญ้จ"็ญ๏ผๆถๆไผ่ขซ่ฐ็จใๆถๅๅๆไฝ๏ผๅๅธ/็ผ่พ๏ผๆถ๏ผ้่ฆ็จๆทๆพๅผๆไพๅญ่ฏใ
| Module | Description |
|---|---|
| ๐ฅ Hot Monitor | Monitor Bilibili hot/trending videos and topics in real-time |
| โฌ๏ธ Downloader | Download Bilibili videos with multiple quality and format options |
| ๐ Watcher | Watch and track video engagement metrics (supports Bilibili) |
| ๐ Subtitle | Download and process subtitles in multiple formats and languages |
| โถ๏ธ Player | Get playback URLs, danmaku (bullet comments), and playlist info |
| ๐ค Publisher | Upload, schedule, edit, and manage videos on Bilibili |
pip install -r requirements.txt
httpx >= 0.24.0aiohttp >= 3.8.0beautifulsoup4 >= 4.12.0lxml >= 4.9.0requests >= 2.31.0faster-whisper >= 1.0.0 (optional, for speech recognition subtitle fallback)Some features (downloading high-quality videos, publishing, etc.) require Bilibili authentication. You can provide credentials in three ways:
export BILIBILI_SESSDATA="your_sessdata" export BILIBILI_BILI_JCT="your_bili_jct" export BILIBILI_BUVID3="your_buvid3"
Create a JSON file (e.g.,
credentials.json):
{ "sessdata": "your_sessdata", "bili_jct": "your_bili_jct", "buvid3": "your_buvid3" }
Pass credentials directly when initializing:
from main import BilibiliAllInOneapp = BilibiliAllInOne( sessdata="your_sessdata", bili_jct="your_bili_jct", buvid3="your_buvid3", )
By default, credentials are kept in-memory only and are not saved to disk. To enable automatic persistence across sessions:
# Via environment variable export BILIBILI_PERSIST=1
# Or via code app = BilibiliAllInOne(persist=True)
When persistence is enabled:
.credentials.json (with 0600 permissions) after initializationapp.auth.persist = True / app.auth.persist = Falseapp.auth.clear_persisted()How to get cookies: Log in to bilibili.com, open browser DevTools (F12) โ Application โ Cookies, and copy the values of
,SESSDATA, andbili_jct.buvid3
This skill handles sensitive Bilibili session cookies. Please read the following carefully:
| Concern | Detail |
|---|---|
| What credentials are needed? | , , โ Bilibili full browser session cookies (not limited API keys). Providing them grants broad access to your Bilibili account. |
| Which features require authentication? | Publishing (upload/edit/schedule/draft), downloading 1080p+/4K quality videos |
| Which features work WITHOUT credentials? | Hot monitoring, standard-quality downloads, subtitle listing, danmaku fetching, stats viewing |
| Where are credentials sent? | To official Bilibili API endpoints (, ) over HTTPS only |
| Are credentials persisted to disk? | NO by default โ credentials stay in memory. Set or to opt-in to automatic persistence (saved to with permissions). You can also manually call |
| File permissions for saved credentials | (owner read/write only) โ restrictive by default |
persist=True if you need credentials to survive across sessions.0600 permissions. Use auth.clear_persisted() or auth.persist = False to remove the file when no longer needed.SESSDATA and bili_jct are full session cookies. They are NOT scoped/limited API keys. Treat them with the same care as your account password.| Domain | Purpose |
|---|---|
| Video info, stats, hot lists, subtitles, danmaku, playback URLs |
| Video publishing (upload, edit) |
| Video file upload CDN |
| Web page scraping fallback |
| Module | Auth Required? | Notes |
|---|---|---|
| ๐ฅ Hot Monitor | โ No | All public APIs |
| โฌ๏ธ Downloader | โ ๏ธ Optional | Required only for 1080p+ / 4K quality |
| ๐ Watcher | โ No | Public stats APIs |
| ๐ Subtitle | โ No | Public subtitle APIs |
| โถ๏ธ Player | โ ๏ธ Optional | Required for high-quality playback URLs |
| ๐ค Publisher | โ Required | All operations need + |
python main.py <skill_name> <action> [params_json]
import asyncio from main import BilibiliAllInOneapp = BilibiliAllInOne()
async def demo(): result = await app.execute("hot_monitor", "get_hot", limit=5) print(result)
asyncio.run(demo())
bilibili_hot_monitor)Monitor Bilibili hot/trending videos and topics in real-time. Supports filtering by category, tracking rank changes.
| Action | Description | Parameters |
|---|---|---|
| Get popular/hot videos | , |
| Get trending series/topics | |
| Get weekly must-watch list | (week number, optional) |
| Get category ranking videos | , |
all, anime, music, dance, game, tech, life, food, car, fashion, entertainment, movie, tv
# Get top 10 hot videos python main.py hot_monitor get_hot '{"page_size": 10}'Get trending topics
python main.py hot_monitor get_trending '{"limit": 5}'
Get this week's must-watch
python main.py hot_monitor get_weekly
Get game category rankings
python main.py hot_monitor get_rank '{"category": "game", "limit": 10}'
# Python API result = await app.execute("hot_monitor", "get_hot", page_size=10) result = await app.execute("hot_monitor", "get_rank", category="game", limit=10)
bilibili_downloader)Download Bilibili videos with support for multiple quality options, batch downloading, and format selection.
| Action | Description | Parameters |
|---|---|---|
| Get video information | |
| List available qualities/formats | |
| Download a single video | , , , , |
| Download multiple videos | , , , |
360p, 480p, 720p, 1080p (default), 1080p+, 4k
mp4 (default), flv, mp3 (audio only)
# Get video info python main.py downloader get_info '{"url": "BV1xx411c7mD"}'List available formats
python main.py downloader get_formats '{"url": "BV1xx411c7mD"}'
Download in 1080p MP4
python main.py downloader download '{"url": "BV1xx411c7mD", "quality": "1080p", "format": "mp4"}'
Extract audio only
python main.py downloader download '{"url": "BV1xx411c7mD", "format": "mp3"}'
Batch download
python main.py downloader batch_download '{"urls": ["BV1xx411c7mD", "BV1yy411c8nE"], "quality": "720p"}'
# Python API info = await app.execute("downloader", "get_info", url="BV1xx411c7mD") result = await app.execute("downloader", "download", url="BV1xx411c7mD", quality="1080p")
bilibili_watcher)Watch and monitor Bilibili videos. Track view counts, comments, likes, and other engagement metrics over time.
| Action | Description | Parameters |
|---|---|---|
| Get detailed video information | |
| Get current engagement statistics | |
| Track metrics over time | , (minutes), (hours) |
| Compare multiple videos | |
https://www.bilibili.com/video/BVxxxxxx or BVxxxxxx# Get video details python main.py watcher watch '{"url": "BV1xx411c7mD"}'Get current stats
python main.py watcher get_stats '{"url": "BV1xx411c7mD"}'
Track views every 30 minutes for 12 hours
python main.py watcher track '{"url": "BV1xx411c7mD", "interval": 30, "duration": 12}'
Compare multiple videos
python main.py watcher compare '{"urls": ["BV1xx411c7mD", "BV1yy411c8nE"]}'
# Python API comparison = await app.execute("watcher", "compare", urls=["BV1xx411c7mD", "BV1yy411c8nE"])
bilibili_subtitle)Download and process subtitles/CC from Bilibili videos. Supports multiple subtitle formats and languages.
When no CC subtitles are available, the module automatically falls back to:
faster-whisper (requires pip install faster-whisper)Both fallback results are returned together when triggered.
| Action | Description | Parameters |
|---|---|---|
| List available subtitles | |
| Download subtitles (with auto-fallback) | , , , |
| Convert subtitle format | , , |
| Merge multiple subtitle files | , , |
srt (default), ass, vtt, txt, json
zh-CN (default), en, ja, and other language codes available on the video.
When
download is called and no CC subtitles exist:
CC Subtitle Available? โโYesโโโถ Download CC subtitle โ No โ โผ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ Fallback 1: Speech Recognition โ โ Download audio โ faster-whisper โ โ Output: {title}_transcribed.srt โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ Fallback 2: Danmaku Extraction โ โ Fetch bullet comments โ SRT โ โ Output: {title}_danmaku.srt โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# List available subtitles python main.py subtitle list '{"url": "BV1xx411c7mD"}'Download Chinese subtitles in SRT format (auto-fallback if no CC)
python main.py subtitle download '{"url": "BV1xx411c7mD", "language": "zh-CN", "format": "srt"}'
Download English subtitles in ASS format
python main.py subtitle download '{"url": "BV1xx411c7mD", "language": "en", "format": "ass"}'
Convert SRT to VTT
python main.py subtitle convert '{"input_path": "./subtitles/video.srt", "output_format": "vtt"}'
Merge subtitle files
python main.py subtitle merge '{"input_paths": ["part1.srt", "part2.srt"], "output_path": "merged.srt"}'
# Python API subs = await app.execute("subtitle", "list", url="BV1xx411c7mD") result = await app.execute("subtitle", "download", url="BV1xx411c7mD", language="zh-CN", format="srt") # When no CC subtitles, result includes both fallback outputs: # result["transcription"]["filepath"] โ speech recognition SRT # result["danmaku"]["filepath"] โ danmaku SRT
bilibili_player)Play Bilibili videos with support for playback control, playlist management, and danmaku (bullet comments) display.
| Action | Description | Parameters |
|---|---|---|
| Get complete playback info | , , |
| Get direct play URLs | , , |
| Get danmaku/bullet comments | , , |
| Get playlist/multi-part info | |
| Mode | Description |
|---|---|
| 1 | Scroll (right to left) |
| 4 | Bottom fixed |
| 5 | Top fixed |
# Get playback info python main.py player play '{"url": "BV1xx411c7mD", "quality": "1080p"}'Get direct play URLs
python main.py player get_playurl '{"url": "BV1xx411c7mD", "quality": "720p"}'
Get danmaku
python main.py player get_danmaku '{"url": "BV1xx411c7mD"}'
Get playlist for multi-part video
python main.py player get_playlist '{"url": "BV1xx411c7mD"}'
Get page 3 of a multi-part video
python main.py player play '{"url": "BV1xx411c7mD", "quality": "1080p", "page": 3}'
# Python API play_info = await app.execute("player", "play", url="BV1xx411c7mD", quality="1080p") danmaku = await app.execute("player", "get_danmaku", url="BV1xx411c7mD") playlist = await app.execute("player", "get_playlist", url="BV1xx411c7mD")
bilibili_publisher)Publish videos to Bilibili. Supports uploading videos, setting metadata, scheduling publications, and managing drafts.
โ ๏ธ Authentication Required: All publisher actions require valid Bilibili credentials.
| Action | Description | Parameters |
|---|---|---|
| Upload and publish a video | , , , , , , , , |
| Save as draft | , , , , , |
| Schedule future publication | , , , , , , |
| Edit existing video metadata | , , , , , |
| Parameter | Type | Default | Description |
|---|---|---|---|
| string | required | Path to the video file |
| string | required | Video title (max 80 chars) |
| string | | Video description (max 2000 chars) |
| string[] | | Tags (max 12, each max 20 chars) |
| string | | Category TID |
| string | | Path to cover image (JPG/PNG) |
| int | | 1 = original content, 0 = repost |
| int | | 1 = enable charging, 0 = disable |
# Upload and publish python main.py publisher upload '{"file_path": "./video.mp4", "title": "My Video", "description": "Hello World", "tags": ["test", "demo"], "category": "171"}'Save as draft
python main.py publisher draft '{"file_path": "./video.mp4", "title": "Draft Video"}'
Schedule publication
python main.py publisher schedule '{"file_path": "./video.mp4", "title": "Scheduled Video", "schedule_time": "2025-12-31T20:00:00+08:00"}'
Edit video metadata (requires re-uploading the video file)
python main.py publisher edit '{"bvid": "BV1xx411c7mD", "file_path": "./video.mp4", "title": "New Title", "tags": ["updated"]}'
# Python API (authentication required) app = BilibiliAllInOne(sessdata="xxx", bili_jct="xxx", buvid3="xxx") result = await app.execute("publisher", "upload", file_path="./video.mp4", title="My Video", description="Published via bilibili-all-in-one", tags=["python", "bilibili"], ) # Edit video (requires file_path for re-upload) result = await app.execute("publisher", "edit", bvid="BV1xx411c7mD", file_path="./video.mp4", title="New Title", tags=["updated"], )
bilibili-all-in-one/ โโโ skill.json # Skill configuration & parameter schema โโโ skill.md # This documentation file โโโ README.md # Project README (Chinese) โโโ LICENSE # MIT License โโโ requirements.txt # Python dependencies โโโ .gitignore # Git ignore rules โโโ main.py # Entry point & unified BilibiliAllInOne class โโโ src/ โโโ __init__.py # Package exports โโโ auth.py # Authentication & credential management โโโ utils.py # Shared utilities, API constants, helpers โโโ hot_monitor.py # Hot/trending video monitoring โโโ downloader.py # Video downloading โโโ watcher.py # Video watching & stats tracking โโโ subtitle.py # Subtitle downloading & processing โโโ player.py # Video playback & danmaku โโโ publisher.py # Video uploading & publishing
All skill actions return a JSON object with a unified structure:
{ "success": true, "...": "action-specific fields" }
On error:
{ "success": false, "message": "Error description" }
MIT
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
ยฉ 2026 Torly.ai. All rights reserved.