Bilibili Video Downloader
哔哩哔哩视频搜索与下载工具。使用场景: - 根据关键词搜索B站视频 - 下载B站视频(支持多种清晰度) - 获取视频详情、弹幕、评论 - 批量下载UP主视频 - "帮我下载B站上的XX视频" - "搜索B站关于XX的视频" - "把B站这个视频下载下来" - "获取B站视频弹幕
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 25 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
OpenClaw
Suspicious
medium confidencePurpose & Capability
Name/description align with the included files and runtime behavior: scripts call yt-dlp, ffmpeg and Bilibili APIs to search, fetch metadata, download video, comments and danmaku. No unrelated network endpoints, binaries or credentials are requested.
Instruction Scope
SKILL.md and scripts limit activity to searching, metadata retrieval, downloading and use of cookies for authenticated downloads. The skill explicitly warns the execution environment may not permit file writes and recommends manual execution. However documentation (PERMISSIONS.md / INSTALL.md) also contains step-by-step guidance for changing system execution policy and granting broad write permissions to directories — these expand the operational scope if followed.
Install Mechanism
There is no external installer; this is instruction+script based (lowest install risk). A helper script (install-check.sh) will attempt to install yt-dlp via pip3 if not present, which is expected but an action that executes package installs on the user's system and should be reviewed before running.
Credentials
The skill does not request environment variables or external credentials in metadata. It does instruct users to create a cookies.txt for authenticated downloads — which is appropriate for the claimed function but is sensitive data (SESSDATA, bili_jct). The scripts will read cookies.txt from the script directory if present; users should not place other secrets there.
Persistence & Privilege
The skill itself does not declare always: true or persistently modify other skills. However PERMISSIONS.md recommends potentially risky actions (running the agent as administrator, changing PowerShell execution policy, and using icacls to grant Everyone:F on a directory). Those are broad privilege escalations that are unnecessary for basic use and present real security risk if followed.
What to consider before installing
This package appears to do exactly what it says: it wraps yt-dlp and uses Bilibili APIs to search and download videos. Before using it: 1) Inspect the scripts locally (they are plain shell/Python and readable). 2) Do NOT blindly follow the PERMISSIONS.md steps to grant Everyone:F or permanently run the agent as administrator — instead create a single dedicated low-privilege directory for downloads and give only your user account access. 3) Treat cookies.txt as a secret (contains session tokens); place it only in a controlled folder and delete it when done. 4) If you run install-check.sh, review it first — it may run pip3 install yt-dlp (expected) but installing packages should be a conscious choice. 5) Prefer the recommended 'manual execution' workflow (copy the generated yt-dlp commands and run them yourself) unless you explicitly trust the environment and are comfortable with temporary, scoped permission changes. If you want a safer assessment, provide the exact environment (OS, how OpenClaw runs commands) so I can point out any additional platform-specific risks.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.1.0
Download ziplatestutilityvideo downloader
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
Runtime requirements
📺 Clawdis
SKILL.md
Bilibili Video Downloader
基于 yt-dlp 封装的哔哩哔哩视频下载工具。
快速参考
| 脚本 | 用途 |
|---|---|
install-check.ps1 | 检查依赖是否安装 (Windows) |
install-check.sh | 检查依赖是否安装 (macOS/Linux) |
search.ps1/sh <关键词> [数量] | 搜索B站视频 |
download.ps1/sh <URL> [清晰度] | 下载单个视频 |
video-info.ps1/sh <URL> | 获取视频详情 |
快速开始
Windows
cd scripts\
# 1. 检查依赖
.\install-check.ps1
# 2. 搜索视频
.\search.ps1 -Keyword "Python教程" -Limit 10
# 3. 下载视频(默认最高清晰度)
.\download.ps1 -Url "https://www.bilibili.com/video/BV1xx411c7mD"
# 4. 指定清晰度下载
.\download.ps1 -Url "https://www.bilibili.com/video/BV1xx411c7mD" -Quality 1080
macOS / Linux
cd scripts/
# 1. 检查依赖
./install-check.sh
# 2. 搜索视频
./search.sh "Python教程" 10
# 3. 下载视频
./download.sh "https://www.bilibili.com/video/BV1xx411c7mD"
搜索视频
Windows
.\search.ps1 -Keyword "关键词" -Limit 20
# 示例
.\search.ps1 -Keyword "深度学习" -Limit 20
.\search.ps1 -Keyword "考研数学" -Limit 10
macOS / Linux
./search.sh "关键词" [结果数量]
# 示例
./search.sh "深度学习" 20
./search.sh "考研数学" 10
输出格式:
标题 | UP主 | 播放量 | BV号 | 链接
下载视频
单视频下载
Windows:
.\download.ps1 -Url "<URL>" -Quality <清晰度> -OutputDir <目录>
# 清晰度选项: 360, 480, 720, 1080, 1080p+, 4K (默认best)
.\download.ps1 -Url "https://www.bilibili.com/video/BV1xx411c7mD"
.\download.ps1 -Url "https://www.bilibili.com/video/BV1xx411c7mD" -Quality 1080 -OutputDir ".\my-videos"
macOS / Linux:
./download.sh <URL> [清晰度] [输出目录]
./download.sh "https://www.bilibili.com/video/BV1xx411c7mD"
./download.sh "https://www.bilibili.com/video/BV1xx411c7mD" 1080 ./downloads
批量下载
创建包含URL的文件(每行一个):
https://www.bilibili.com/video/BV1xx411c7mD
https://www.bilibili.com/video/BV1yy411c7nE
https://www.bilibili.com/video/BV1zz411c7oF
然后执行(macOS/Linux):
./download-batch.sh urls.txt 1080 ./downloads
获取视频信息
Windows:
.\video-info.ps1 -Url "https://www.bilibili.com/video/BV1xx411c7mD"
macOS / Linux:
./video-info.sh "https://www.bilibili.com/video/BV1xx411c7mD"
获取UP主视频列表 (macOS/Linux)
# 获取UP主视频列表
./up-videos.sh "UID" 50
# 示例:获取UID为208259的UP主前30个视频
./up-videos.sh 208259 30
如何获取UID:打开UP主主页,URL中的数字就是UID,如 space.bilibili.com/208259
获取评论 (macOS/Linux)
./comments.sh "https://www.bilibili.com/video/BV1xx411c7mD" 100
下载弹幕 (macOS/Linux)
./danmaku.sh "https://www.bilibili.com/video/BV1xx411c7mD" danmaku.xml
依赖要求
- Python 3.8+
- yt-dlp
- ffmpeg (用于合并音视频)
安装依赖
Windows
# 安装 Python
winget install Python.Python.3.12
# 安装 yt-dlp
pip install yt-dlp
# 安装 ffmpeg
winget install Gyan.FFmpeg
macOS
# 安装 Python 和 yt-dlp
brew install python yt-dlp ffmpeg
# 或
pip3 install yt-dlp
Ubuntu / Debian
sudo apt update
sudo apt install python3 python3-pip ffmpeg
pip3 install yt-dlp
注意事项
- 下载的视频仅供个人学习使用,请遵守版权法规
- 部分视频需要登录才能下载高清版本
- 大会员专享视频需要配置cookies
- 建议配置cookies以获得最佳下载体验
配置Cookies(可选)
如需下载大会员专享或高清视频,配置cookies:
- 浏览器登录B站
- 使用浏览器扩展导出cookies为txt格式(如 "Get cookies.txt")
- 保存为
cookies.txt放在脚本目录
执行环境权限说明
⚠️ 重要提示:本 Skill 的执行环境有安全限制,可能无法直接写入文件。
| 功能 | 状态 | 说明 |
|---|---|---|
| 获取视频信息 | ✅ 可用 | 可以获取标题、播放量、清晰度等 |
| 生成下载命令 | ✅ 可用 | 可以生成 yt-dlp 命令 |
| 自动下载文件 | ⚠️ 受限 | 取决于执行环境权限 |
解决方案
方案 A:手动执行(推荐) AI 提供下载命令,你自己复制粘贴运行:
yt-dlp "https://www.bilibili.com/video/BV18NzvB5EZu" -o "$HOME\Downloads\%(title)s.%(ext)s"
方案 B:提升权限(可选) 如需 AI 直接下载文件,请参考 PERMISSIONS.md 配置权限。
工作原理
本Skill基于 yt-dlp 实现:
- 视频搜索:使用 yt-dlp 的搜索功能
- 视频下载:自动选择最佳音视频流并合并
- 信息获取:解析B站API返回的元数据
- 弹幕/评论:调用B站公开API获取
Files
17 totalSelect a file
Select a file to preview.
Comments
Loading comments…
