Bilibili Favorites
Use the scripts in scripts/ to read your Bilibili favorites via web APIs (API-first; no RSSHub).
Cookie auth (recommended)
- •CookieCloud (no copy/paste): set
COOKIECLOUD_UUID+COOKIECLOUD_PASSWORD(also acceptsCOOKIECLOUDUUID/COOKIECLOUDPASSWORD)- •Optional:
COOKIECLOUD_SERVER_URL(default:http://127.0.0.1:8088)
- •Optional:
- •Or set
BILIBILI_COOKIE(rawCookie:header string) - •Or pass
--cookie 'SESSDATA=...; ...'to a script (highest priority)
Quick Start
Probe login / current user:
bash
docker compose run --rm runner python skills/bilibili-favorites/scripts/bili_me.py
List favorite folders (auto-detect uid from cookies):
bash
docker compose run --rm runner python skills/bilibili-favorites/scripts/bili_folders.py docker compose run --rm runner python skills/bilibili-favorites/scripts/bili_folders.py --include-collected
List items inside a folder (recently collected first):
bash
docker compose run --rm runner python skills/bilibili-favorites/scripts/bili_folder_items.py --media-id <folderId> --order mtime --limit 50
Fetch video transcript (subtitles; best for summarization):
bash
docker compose run --rm runner python skills/bilibili-favorites/scripts/bili_video_transcript.py --url 'https://www.bilibili.com/video/BV...' --timestamps
JSON mode (for piping / automation):
- •Add
--jsonto any script.
How To Answer Common Requests
- •"帮我看看 B 站的收藏夹"
- •Run
docker compose run --rm runner python skills/bilibili-favorites/scripts/bili_folders.py --jsonand show folderid/title/media_countso the user can pick a folder.
- •Run
- •"最近我都收藏了哪些视频?"
- •Pick folder(s) and run
docker compose run --rm runner python skills/bilibili-favorites/scripts/bili_folder_items.py --media-id <folderId> --order mtime --limit 20.
- •Pick folder(s) and run
- •"这个 BV/视频讲了啥内容?"
- •Run
docker compose run --rm runner python skills/bilibili-favorites/scripts/bili_video_transcript.py --url ...and summarize from the transcript (not from video frames). - •If the script exits with code
2/ prints "No subtitles found", the video has no subtitle track:- •Download audio via
skills/media-audio-download, then transcribe viaskills/whisper-transcribe-docker(local, Docker), or - •Use
skills/openai-whisper/skills/openai-whisper-apias an alternative STT path.
- •Download audio via
- •Run
Troubleshooting
- •"No cookies found": set CookieCloud env vars or
BILIBILI_COOKIE, or pass--cookie. - •"Failed to auto-detect uid": cookies are not logged in (refresh CookieCloud sync).
- •Non-zero Bilibili API
code: seereferences/research.mdfor endpoint list + fallback plan (WBI signing / Playwright capture).