← Back to Skills Marketplace
hhjin

Bilibili 收藏视频下载

by hhjin · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
117
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install bilibili-favorites-downloader
Description
下载 Bilibili 用户个人收藏夹视频的工具。当用户提到以下任何场景时必须使用此 Skill: - "下载 Bilibili 收藏"、"bilibili 收藏下载"、"备份 bilibili 收藏夹" - "下载 B 站收藏"、"B站收藏夹下载" - "获取收藏视频列表"、"导出 bilibili 收藏" -...
README (SKILL.md)

Bilibili 收藏视频下载工具

功能概述

此 Skill 用于下载 Bilibili 用户个人的收藏夹视频,支持批量下载、大小过滤、最高清晰度等功能。

使用场景

  1. 备份收藏夹 - 将收藏的 Bilibili 视频下载到本地
  2. 离线观看 - 下载视频以便离线观看
  3. 整理收藏 - 获取收藏视频列表并导出

前置要求

  • Python 3.7+
  • yt-dlp (会自动检查并提示安装)
  • 网络连接

Script Directory

Determine this SKILL.md directory as {baseDir}.

Script Purpose
{baseDir}/scripts/download_favorites.py Main python script entry point

使用方法

基本用法

用户只需要提供用户个人收藏夹 URL 或收藏夹 ID,工具会自动完成其余工作: 请提示用户在网页上登陆 www.bilibili.com, 进入用户个人收藏夹, 把浏览器地址栏收藏夹URL复制告诉AI

  Bilibili 收藏夹URL示例:https://space.bilibili.com/123456/favlist?fid=7890123

Run Script Examples with Params

基础使用(下载收藏夹,默认500MB大小限制,推荐首次使用)

python {baseDir}/scripts/download_favorites.py \
  --url "https://space.bilibili.com/123456/favlist?fid=7890123"

日常使用(推荐配置,限制300MB大小,指定输出目录)

python {baseDir}/scripts/download_favorites.py \
  --url "https://space.bilibili.com/123456/favlist?fid=7890123" \
  --size-limit 300 \
  --output-dir ~/Downloads/bilibili_favorites/

仅获取视频列表(不下载视频)

python {baseDir}/scripts/download_favorites.py \
  --url "https://space.bilibili.com/123456/favlist?fid=7890123" \
  --list-only

限制下载数量(只下载前10个视频)

python {baseDir}/scripts/download_favorites.py \
  --url "https://space.bilibili.com/123456/favlist?fid=7890123" \
  --max-download 10

参数说明

参数 说明 默认值
--url Bilibili 收藏夹页面 URL 必需参数
--size-limit 视频大小限制(MB),超过则跳过 500
--output-dir 自定义下载输出目录 ~/Downloads/bilibili_favorites/
--list-only 仅获取视频列表,不下载视频 False
--max-download 最大下载视频数量 无限制(下载全部)
--skip-existing 跳过已存在的视频文件(脚本默认行为) True(无需指定)

支持的 URL 格式

  • https://space.bilibili.com/{user_id}/favlist?fid={fav_id}

工作流程

  1. 解析收藏夹信息 - 从 URL 中提取用户 ID 和收藏夹 ID
  2. 获取视频列表 - 调用 Bilibili API 获取所有收藏视频(支持分页)
  3. 估算视频大小 - 使用 yt-dlp 获取视频信息并估算大小
  4. 过滤视频 - 根据大小限制过滤视频
  5. 批量下载 - 使用 yt-dlp 下载视频,自动合并音视频
  6. 生成报告 - 输出下载统计信息

输出说明

下载的视频将保存为 MP4 格式,文件名格式为:

{视频标题}_{BV号}.mp4

注意事项

  • 下载的视频仅供个人学习使用
  • 请遵守 Bilibili 用户协议和相关法律法规
  • 部分高清晰度视频需要大会员才能下载
  • 失效视频会自动跳过并记录

故障排除

无法获取视频列表

  • 检查收藏夹是否为公开状态
  • 检查网络连接
  • 确认收藏夹 ID 正确

下载速度慢

  • 这是正常现象,取决于视频大小和网络状况
  • 工具支持断点续传,可以随时中断并继续

视频下载失败

  • 可能是视频已失效或被删除
  • 可能是网络问题,可以重新运行脚本
Usage Guidance
This skill appears to be what it claims: a downloader that lists favorites via Bilibili APIs and calls yt-dlp to fetch videos. Before installing/using: 1) ensure yt-dlp is installed and up to date; 2) do not paste private session cookies or tokens into prompts — the script does not require them and sharing them would expose your account; 3) be aware some favorites may be private/unavailable and the script may skip them; 4) respect copyright and Bilibili's terms; 5) if you want extra safety, run the script in a sandbox or review the provided Python file locally before running.
Capability Analysis
Type: OpenClaw Skill Name: bilibili-favorites-downloader Version: 1.0.0 The skill is a legitimate utility for downloading Bilibili favorite videos. The core logic in `scripts/download_favorites.py` uses the official Bilibili API for metadata and the standard `yt-dlp` tool for video downloading. It includes proper filename sanitization, uses safe subprocess execution (list-based arguments), and lacks any indicators of data exfiltration, persistence, or malicious intent. The instructions in `SKILL.md` are consistent with the tool's purpose and do not contain prompt injection attacks.
Capability Assessment
Purpose & Capability
Name/description match the behavior: the script fetches a favorites list from Bilibili APIs and uses yt-dlp to download videos. No unrelated services or credentials are requested.
Instruction Scope
SKILL.md and the script limit actions to parsing a favorites URL, calling Bilibili endpoints, estimating sizes, and invoking yt-dlp to download. The instructions do not ask the agent to read unrelated files, environment variables, or send data to third-party endpoints.
Install Mechanism
Instruction-only skill with no install spec. It depends on yt-dlp being present and invokes it via subprocess; this is proportionate and expected. No downloads from untrusted URLs or archive extraction are present.
Credentials
No environment variables, credentials, or config paths are required. The script performs network calls only to Bilibili (api.bilibili.com and www.bilibili.com) and runs yt-dlp locally — this aligns with the stated functionality.
Persistence & Privilege
The skill does not request always:true and does not attempt to modify other skills or agent-wide settings. It has normal, non-persistent privileges.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install bilibili-favorites-downloader
  3. After installation, invoke the skill by name or use /bilibili-favorites-downloader
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
bilibili-favorites-downloader 1.0.0 initial release - Download all videos from a user's Bilibili favorites (supports pagination). - Filter videos by estimated size; skip oversized videos. - Download in batch at highest available quality using yt-dlp; supports resuming and skipping existing files. - Automatically handle and skip unavailable videos. - Export favorites list without downloading if needed. - Simple command-line usage with options for output directory, size limit, and download count.
Metadata
Slug bilibili-favorites-downloader
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Bilibili 收藏视频下载?

下载 Bilibili 用户个人收藏夹视频的工具。当用户提到以下任何场景时必须使用此 Skill: - "下载 Bilibili 收藏"、"bilibili 收藏下载"、"备份 bilibili 收藏夹" - "下载 B 站收藏"、"B站收藏夹下载" - "获取收藏视频列表"、"导出 bilibili 收藏" -... It is an AI Agent Skill for Claude Code / OpenClaw, with 117 downloads so far.

How do I install Bilibili 收藏视频下载?

Run "/install bilibili-favorites-downloader" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Bilibili 收藏视频下载 free?

Yes, Bilibili 收藏视频下载 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Bilibili 收藏视频下载 support?

Bilibili 收藏视频下载 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Bilibili 收藏视频下载?

It is built and maintained by hhjin (@hhjin); the current version is v1.0.0.

💬 Comments