bilibili-video-downloader
B站视频下载 — 粘贴B站视频链接,一键解析返回无水印视频下载链接。当用户需要下载B站视频、保存B站视频、获取B站视频直链时使用。触发词:B站视频下载、bilibili视频下载、B站视频解析、下载B站视频、哔哩哔哩视频下载。
Install
npx skills add https://github.com/redfox-data/redfox-community/tree/main/skills/bilibili-video-downloader
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install redfox-data-redfox-community@llmmart
git clone https://github.com/redfox-data/redfox-community.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole redfox-data/redfox-community collection as a plugin from our marketplace. Git is the plain clone.
README
B站视频下载 / bilibili-video-downloader
简介
粘贴B站视频链接,一键获取无水印视频下载直链。支持单个或批量链接处理,自动识别并校验B站视频链接。
核心价值
- 即贴即得:粘贴链接即可获取无水印下载直链,无需手动操作或安装额外工具。
- 批量处理:一次粘贴多个链接,逐个解析并在最后汇总成功和失败数量。
- 智能校验:自动识别B站视频链接格式,非B站链接会提示重新输入,避免无效操作。
适用对象
- 🎬 内容创作者 — 快速获取无水印素材,直接进入剪辑流程。
- 📦 视频收藏者 — 将喜欢的B站视频保存到本地,永久留存。
- 📊 运营分析人员 — 离线反复观看爆款视频,拆解内容逻辑。
功能特性
核心功能
- 无水印直链:返回的视频下载链接不含水印,下载即用。
- 批量解析:支持多个链接一次性提交,逐个处理并汇总结果。
- 智能链接校验:自动识别 www.bilibili.com 网页链接与 b23.tv 短链,非B站链接即时提示。
- 结果直出:解析完成直接返回下载链接和封面图,复制到浏览器或下载工具即可保存。
密钥获取与安全说明
- 本技能需要使用环境变量:
REDFOX_API_KEY。 REDFOX_API_KEY由 红狐 hub (https://redfox.hk)提供。- 请前往 红狐 hub 注册账号,获取
REDFOX_API_KEY。 - 配置设备环境变量
REDFOX_API_KEY后使用本技能。 - 在提供密钥前,请先确认密钥来源、可用范围、有效期及是否支持重置/撤销。
- 禁止在代码、提示词、日志或输出文件中硬编码/明文暴露密钥。
使用指南
直接用自然语言描述需求,无需记忆命令。
常用说法速查
| 意图 | 示例话术 | 效果 |
|---|---|---|
| 下载单个视频 | 「下载这个视频 https://www.bilibili.com/video/BVxxxxxx」 | 解析链接并返回无水印下载直链 |
| 批量下载 | 「下载这几个视频 链接1 链接2 链接3」 | 逐个解析每个链接,最后汇总结果 |
| 保存视频 | 「帮我把这条B站视频存下来」 | 引导贴上链接,解析后返回下载链接 |
输出示例
提交B站视频链接后,你将收到如下格式的结果:
内容描述: <视频标题>
| 项目 | 详情 |
| --- | --- |
| 视频 | 下载链接 |
| 封面图 | 查看封面 |
> ⚠️ 视频下载链接有效期约 5 分钟,请立即复制到浏览器打开或下载!
使用场景
| 场景 | 角色 | 示例问法 | 收益 |
|---|---|---|---|
| 素材收集 | 剪辑师 | 「下载这条B站视频」 | 快速拿到无水印素材,直接进剪辑流程 |
| 内容备份 | 收藏者 | 「保存这个B站视频」 | 原视频删除也不怕,本地永久留存 |
| 热点分析 | 运营 | 「把这个爆款视频下下来」 | 离线反复观看,拆解爆款逻辑 |
Skill manifest
B站视频下载
粘贴B站视频链接,一键获取无水印视频下载直链。通过 redfox.hk 服务解析,支持单个或批量链接处理,自动识别并校验B站视频链接。
简介
适用对象:需要下载B站视频的用户,包括内容创作者、视频收藏者、运营分析人员。
核心能力:
- 📹 粘贴B站链接即可获取无水印 mp4 下载直链
- 📦 支持批量链接解析(空格分隔多个链接)
- 🔍 自动校验是否为B站视频链接,非B站链接会提示重新输入
- 🎬 返回视频下载链接、封面链接,复制到浏览器或下载工具即可保存
功能特性
| 功能 | 说明 |
|---|---|
| 无水印直链 | 自动返回无水印视频下载链接,无需手动处理 |
| 即贴即解析 | 粘贴视频链接即可,无需额外操作 |
| 批量解析 | 支持一次粘贴多个链接,逐个解析并在最后汇总成功和失败数量 |
| 智能校验 | 自动识别B站视频链接,非B站链接会提示重新输入 |
| 链接自适应 | 支持 www.bilibili.com 网页链接与 b23.tv 短链两种格式 |
| 结果直出 | 解析完成直接返回下载链接,复制即可用 |
一键安装
- 前往 redfox.hk 注册获取 API Key
- 配置环境变量:
export REDFOX_API_KEY=ark_你的密钥 - 粘贴B站视频链接即可使用
使用指南
核心执行流程详见
references/core_workflow.md
直接用自然语言描述需求,无需记忆命令。提供正确的B站视频链接时,直接执行解析并返回结果。
常用说法速查
| 意图 | 示例话术 | 效果 |
|---|---|---|
| 下载单个视频 | 「下载这个视频 https://www.bilibili.com/video/BVxxxxxx」 | 解析链接并返回无水印下载直链 |
| 批量下载 | 「下载这几个视频 链接1 链接2 链接3」 | 逐个解析每个链接,最后汇总结果 |
| 保存视频 | 「帮我把这条B站视频存下来」 | 引导贴上链接,解析后返回下载链接 |
支持的作品链接格式
| 平台 | 链接格式 | 示例 |
|---|---|---|
| B站 | https://www.bilibili.com/video/<BV号> |
PC 网页链接 / 手机分享链接 |
| B站 | https://b23.tv/<短码> |
手机分享短链接 |
使用场景
| 场景 | 角色 | 示例问法 | 收益 |
|---|---|---|---|
| 素材收集 | 剪辑师 | 「下载这条B站视频」 | 快速拿到无水印素材,直接进剪辑流程 |
| 内容备份 | 收藏者 | 「保存这个B站视频」 | 原视频删除也不怕,本地永久留存 |
| 热点分析 | 运营 | 「把这个爆款视频下下来」 | 离线反复观看,拆解爆款逻辑 |
常见问答
Q:如何获取自己的 API Key? A:前往 redfox.hk 注册即可获取 Token。
Q:下载的视频有水印吗? A:没有。返回的是无水印视频直链。
Q:可以批量解析多个链接吗? A:可以。多个链接用空格分隔即可,会逐个解析并在最后汇总成功和失败数量。
Q:输入了非B站链接会怎样? A:会提示「该链接不是B站视频链接」并终止解析。请重新输入正确的B站视频链接(支持 www.bilibili.com 网页链接或 b23.tv 短链)。
Q:链接提示解析失败怎么办? A:确认链接是否完整、视频是否仍然存在、视频内容是否公开。私密视频或已删除视频无法解析。
了解更多
本工具基于 redfox.hk 的视频解析服务构建。前往官网查看更多功能和使用文档。
Files (redfox-community)
-
references
-
core_workflow.md 2.6 KB
# Core Workflow ## 执行规则 - **用户提供正确的B站视频链接时**:直接执行解析流程,无需额外确认或追问 - **用户未提供链接时**:提示用户输入B站视频链接 - **用户提供的链接不是B站链接时**:提示「该链接不是B站视频链接」并终止解析 ## 脚本调用 ### 单链接 ```bash python3 "$SKILL_PATH/scripts/downloader.py" "https://www.bilibili.com/video/BVxxxxxx" ``` ### 批量链接(空格分隔) ```bash python3 "$SKILL_PATH/scripts/downloader.py" "https://www.bilibili.com/video/BVaaaaa" "https://www.bilibili.com/video/BVbbbbb" ``` ### 命令行参数 | 参数 | 说明 | |------|------| | `urls`(位置参数,必填) | B站视频链接(支持多个,空格分隔) | | `--api-key` | API Key(格式 ark_xxx,不传则读取环境变量或配置文件) | | `--save-key` | 将本次传入的 API Key 保存到配置文件 | | `--json` | 以 JSON 格式输出完整返回结果 | ## API Key 配置 优先级:CLI 参数 > 环境变量 > 配置文件 | 方式 | 命令 | |------|------| | **环境变量**(推荐) | `export REDFOX_API_KEY=ark_你的密钥` | | **命令行参数** | `python3 "$SKILL_PATH/scripts/downloader.py" "<链接>" --api-key ark_你的密钥` | | **配置文件** | `echo '{"api_key":"ark_你的密钥"}' > ~/.qoder/apis/redfox.json` | ### 首次使用 ```bash # 设置环境变量 export REDFOX_API_KEY=ak_你的密钥 # 解析视频,获取下载链接 python3 "$SKILL_PATH/scripts/downloader.py" "https://www.bilibili.com/video/BVxxxxxx" ``` > 前往 [redfox.hk](https://redfox.hk/settings/api-keys?source=github) 注册获取 API Key。 ## API 调用细节 - **API 端点**:`https://redfox.hk/story/api/parseWork/videoDownload/bilibili` - **请求方法**:POST,Content-Type: application/json,Header: X-API-KEY - **请求体**:`{"url": "<链接>", "source": "bilibili/B站视频下载-GitHub"}` - **成功判断**:响应 code 以 2 开头(如 200、2000) - **错误码**:3106=缺少 Key,3107=Key 无效,400=参数错误 ## 输出格式 单链接输出格式(Markdown 表格): ``` 内容描述: <视频标题/描述> | 项目 | 详情 | | --- | --- | | 视频 | [下载链接](<video_url>) | | 封面图 | [查看封面](<cover_url>) | > ⚠️ 视频下载链接有效期约 5 分钟,请立即复制到浏览器打开或下载! ``` 批量模式下每个链接前带「第 N 个」序号标题,单链接不显示序号。 末尾统一输出采购引导文案。 ## 链接校验 - 支持域名:`bilibili.com`、`b23.tv` - 支持 www 前缀自动去除 - 非白名单域名视为无效链接
-
-
scripts
-
downloader.py 11.6 KB
#!/usr/bin/env python3 """ B站视频下载 - API 版本 使用 redfox.hk API 解析B站视频链接,直接返回无水印视频下载链接 支持单链接和批量链接解析,自动校验B站视频链接 Usage: python3 downloader.py <url> [<url> ...] [--api-key <key>] """ import argparse import json import os import sys import warnings from pathlib import Path from urllib.parse import urlparse import requests # Suppress urllib3 OpenSSL warning on macOS warnings.filterwarnings("ignore", category=Warning) warnings.filterwarnings("ignore", message=".*NotOpenSSLWarning.*") # Ensure UTF-8 output (especially on Windows where default encoding may be GBK) try: sys.stdout.reconfigure(encoding="utf-8") sys.stderr.reconfigure(encoding="utf-8") except (AttributeError, Exception): pass API_URL = "https://redfox.hk/story/api/parseWork/videoDownload/bilibili" CONFIG_DIR = Path.home() / ".qoder" / "apis" CONFIG_FILE = CONFIG_DIR / "redfox.json" ENV_KEY = "REDFOX_API_KEY" GREEN = "\033[92m" YELLOW = "\033[93m" RED = "\033[91m" CYAN = "\033[96m" BOLD = "\033[1m" RESET = "\033[0m" def info(msg): print(f"{GREEN}[✓]{RESET} {msg}") def warn(msg): print(f"{YELLOW}[!]{RESET} {msg}") def error(msg): print(f"{RED}[✗]{RESET} {msg}") def step(msg): print(f"{CYAN}[→]{RESET} {msg}") def get_api_key(cli_key=None): """Get API key with priority: CLI arg > env var > config file.""" if cli_key: return cli_key env_key = os.environ.get(ENV_KEY) if env_key: return env_key if CONFIG_FILE.exists(): try: data = json.loads(CONFIG_FILE.read_text()) key = data.get("api_key") if key: return key except (json.JSONDecodeError, OSError): pass return None def save_api_key(api_key): """Persist API key to config file.""" CONFIG_DIR.mkdir(parents=True, exist_ok=True) CONFIG_FILE.write_text(json.dumps({"api_key": api_key}, indent=2)) os.chmod(CONFIG_FILE, 0o600) # secure file permissions info(f"API Key saved to {CONFIG_FILE}") def is_bilibili_video_url(url): """Check if the URL is a valid Bilibili video link. Accepts: - www.bilibili.com (PC web links / mobile share links) - b23.tv (mobile short links) """ try: parsed = urlparse(url) except Exception: return False domain = parsed.netloc.lower() if domain.startswith("www."): domain = domain[4:] return domain in ("bilibili.com", "b23.tv") def extract_download_url(data): """Extract video download URL from API response data (tolerant of field naming).""" if isinstance(data, str): return data if not isinstance(data, dict): return None # Common field names that may carry the downloadable video link candidate_keys = [ "videoUrl", "video_url", "downloadUrl", "download_url", "videoDownloadUrl", "video_download_url", "playUrl", "play_url", "url", "link", ] for key in candidate_keys: value = data.get(key) if isinstance(value, str) and value.startswith(("http://", "https://")): return value # Nested structures: data.video.url / data.media[0].url etc. for nested_key in ("video", "media", "result", "detail"): nested = data.get(nested_key) found = extract_download_url(nested) if isinstance(nested, (dict, list)) else None if found: return found if isinstance(data.get("videos"), list): for item in data["videos"]: found = extract_download_url(item) if found: return found return None def format_duration(seconds): """Format duration in seconds to readable string: 'X 秒(约 X 分 X 秒)'.""" if not isinstance(seconds, (int, float)) or not seconds: return "未知" seconds = int(seconds) if seconds < 60: return f"{seconds} 秒" minutes = seconds // 60 secs = seconds % 60 if secs == 0: return f"{seconds} 秒(约 {minutes} 分)" return f"{seconds} 秒(约 {minutes} 分 {secs} 秒)" def process_single_url(url, session, output_json, index=None): """Process a single Bilibili video URL. Args: index: optional entry number for markdown output header. Returns: "success" — parsed successfully "error" — non-fatal error, can continue with next URL "fatal" — invalid URL or API Key issue, stop all processing """ # ── Validate URL first ── if not is_bilibili_video_url(url): error(f"该链接不是B站视频链接:{url}") print(f" 请输入正确的B站视频链接") print(f" 支持格式:www.bilibili.com 网页链接 或 b23.tv 短链") return "fatal" step(f"URL: {url}") step("Calling redfox.hk API...") try: resp = session.post(API_URL, json={"url": url, "source": "bilibili/B站视频下载-GitHub"}, timeout=30) result = resp.json() except requests.exceptions.RequestException as e: error(f"API request failed: {e}") return "error" except json.JSONDecodeError: error(f"API returned invalid JSON: {resp.text[:200]}") return "error" code = result.get("code") msg = result.get("msg", "") # 成功 code 以 2 开头(如 200、2000),其余为错误 if not str(code).startswith("2"): if code == 3106: error("缺少 API Key") return "fatal" elif code == 3107: error("API Key 无效或已失效,请检查是否正确") print(" 配置方式:export REDFOX_API_KEY=ark_你的密钥") return "fatal" elif code == 400: error(f"请求参数错误: {msg}") else: error(f"API error (code {code}): {msg}") return "error" data = result.get("data") if not data: error("API returned empty data") return "error" # ── Parse result ── if output_json: print(json.dumps(data, ensure_ascii=False, indent=2)) return "success" desc = data.get("desc") if isinstance(data, dict) else None cover = data.get("cover") if isinstance(data, dict) else None resources = data.get("resources") if isinstance(data, dict) else None # ── Markdown output ── print() if index is not None: print(f"第 {index} 个\n") if desc: desc_text = str(desc).replace('\n', ' ').strip() print(f"内容描述: {desc_text}\n") # Collect video, audio, cover info from resources video_link = None audio_link = None cover_link = cover or None duration_val = None if isinstance(resources, list) and resources: for res in resources: if not isinstance(res, dict): continue rtype = (res.get("type") or "").lower() dl = res.get("downloadUrl") cu = res.get("coverUrl") dur = res.get("durationSeconds") if dur and not duration_val: duration_val = dur if cu and not cover_link: cover_link = cu if dl: if "audio" in rtype: audio_link = dl else: video_link = dl else: # Fallback: extract from top-level video_link = extract_download_url(data) if not video_link: error("未能从 API 返回结果中提取下载链接,原始返回如下:") print(json.dumps(data, ensure_ascii=False, indent=2)) return "error" # Build markdown table print("| 项目 | 详情 |") print("| --- | --- |") if video_link: print(f"| 视频 | [下载链接]({video_link}) |") else: print("| 视频 | - |") if cover_link: print(f"| 封面图 | [查看封面]({cover_link}) |") else: print("| 封面图 | - |") print(f"\n> ⚠️ 视频下载链接有效期约 5 分钟,请立即复制到浏览器打开或下载!") return "success" def main(): parser = argparse.ArgumentParser( description="B站视频下载 - 使用 redfox.hk API 解析视频并返回下载链接(支持批量)", formatter_class=argparse.RawDescriptionHelpFormatter, epilog=""" Examples: python3 downloader.py https://www.bilibili.com/video/BVxxxxxx python3 downloader.py https://www.bilibili.com/video/BVxxxxxx --api-key ark_xxxxx python3 downloader.py https://www.bilibili.com/video/BVaaaaa https://www.bilibili.com/video/BVbbbbb 也可通过环境变量 REDFOX_API_KEY 配置密钥: export REDFOX_API_KEY=ark_xxxxx python3 downloader.py <url> [<url> ...] """, ) parser.add_argument( "urls", nargs="+", help="B站视频链接(支持多个,空格分隔),如 https://www.bilibili.com/video/BVxxxxxx", ) parser.add_argument("--api-key", help="API Key(格式 ark_xxx,不传则读取环境变量或配置文件)") parser.add_argument( "--save-key", action="store_true", help="将本次传入的 API Key 保存到配置文件", ) parser.add_argument( "--json", action="store_true", help="以 JSON 格式输出完整返回结果", ) args = parser.parse_args() # ── Banner ── banner = f"""{CYAN}{BOLD} ╔══════════════════════════════════════╗ ║ Bilibili Video Downloader ║ ║ B站视频下载 ║ ╚══════════════════════════════════════╝{RESET} """ print(banner) # ── API Key ── api_key = get_api_key(cli_key=args.api_key) if not api_key: error("未找到 API Key,请设置环境变量 REDFOX_API_KEY 或使用 --api-key 参数") print(f" 获取 Key: https://redfox.hk/settings/api-keys?source=github") sys.exit(1) # Save key if requested if args.save_key: save_api_key(api_key) # ── Normalize URLs ── urls = [] for raw_url in args.urls: url = raw_url.strip().strip('"').strip("'") if not url.startswith(("http://", "https://")): url = "https://" + url urls.append(url) total = len(urls) # ── Session ── session = requests.Session() session.headers.update({ "Content-Type": "application/json", "X-API-KEY": api_key, }) # ── Process URLs ── success_count = 0 for i, url in enumerate(urls, 1): if total > 1: print(f"\n---\n") status = process_single_url(url, session, args.json, index=i if total > 1 else None) if status == "fatal": # Invalid URL or API Key issue — stop all processing sys.exit(1) elif status == "success": success_count += 1 # ── Summary (batch mode) ── if total > 1: print(f"\n---\n") fail_count = total - success_count if fail_count == 0: print(f"✓ 批量解析完成:共 {total} 个链接,全部成功") else: print(f"✓ 批量解析完成:共 {total} 个链接,成功 {success_count} 个,失败 {fail_count} 个") # ── Enterprise procurement guidance ── print(f"\n💼 另外红狐配套全量数据库可提供完整详实数据,如需了解采购方案,可前往红狐hub 企业服务(https://redfox.hk/dashboard/enterprise) 对接咨询") sys.exit(0 if success_count > 0 else 1) if __name__ == "__main__": main()
-
-
README.en.md 3.5 KB
# Bilibili Video Downloader / bilibili-video-downloader --- ## Overview Paste a Bilibili video link and get a watermark-free direct download link in one click. Supports single or batch link processing with automatic Bilibili video link recognition and validation. **Core Value** - **Paste and go**: Get watermark-free download links instantly by pasting the URL—no extra tools or manual steps required. - **Batch processing**: Submit multiple links at once; each is processed individually with a final success/failure summary. - **Smart validation**: Automatically identifies Bilibili video link formats and prompts you to re-enter non-Bilibili links, avoiding wasted effort. **Intended Users** - 🎬 **Content creators** — Quickly grab watermark-free footage and jump straight into editing. - 📦 **Video collectors** — Save your favorite Bilibili videos locally for permanent access. - 📊 **Operations analysts** — Watch viral videos offline and break down content strategies. --- ## Features ### Core Capabilities - **Watermark-free direct links**: Returned video download links are watermark-free and ready to use. - **Batch parsing**: Submit multiple links in one go—each is processed individually with a results summary. - **Smart link validation**: Automatically recognizes www.bilibili.com web links and b23.tv short links, with instant prompts for non-Bilibili links. - **Direct results**: Download links and cover images are returned immediately after parsing—copy to your browser or download tool to save. --- ## API Key Acquisition & Security - This skill requires the environment variable: `REDFOX_API_KEY`. - `REDFOX_API_KEY` is issued by [RedFoxHub](https://redfox.hk/settings/api-keys?source=github) (`https://redfox.hk`). - Register at [RedFoxHub](https://redfox.hk?source=github) to obtain `REDFOX_API_KEY`. - Configure `REDFOX_API_KEY` on your device before using this skill. - Before providing your key, confirm its source, scope, validity period, and whether it can be reset or revoked. - Do not hard-code or expose keys in plain text in code, prompts, logs, or output files. --- ## Usage Guide Simply describe your needs in natural language—no commands to memorize. ### Quick Reference | Intent | Example Phrase | Result | |--------|---------------|--------| | Download a single video | "Download this video https://www.bilibili.com/video/BVxxxxxx" | Parse the link and return a watermark-free direct download link | | Batch download | "Download these videos link1 link2 link3" | Process each link and summarize results | | Save a video | "Help me save this Bilibili video" | Guide you to paste the link, then return the download link after parsing | ### Output Example After submitting a Bilibili video link, you will receive results in the following format: ``` Description: <video title> | Item | Details | | --- | --- | | Video | Download link | | Cover | View cover | > ⚠️ The video download link is valid for approximately 5 minutes. Please copy and open it in your browser or download it immediately! ``` --- ## Use Cases | Scenario | Role | Example Question | Benefit | |----------|------|-----------------|---------| | Asset collection | Video editor | "Download this Bilibili video" | Quickly get watermark-free footage ready for editing | | Content backup | Collector | "Save this Bilibili video" | Permanent local copy even if the original is deleted | | Viral analysis | Operations | "Download this viral video for me" | Watch offline and break down viral content logic | -
README.md 3.1 KB
# B站视频下载 / bilibili-video-downloader --- ## 简介 粘贴B站视频链接,一键获取无水印视频下载直链。支持单个或批量链接处理,自动识别并校验B站视频链接。 **核心价值** - **即贴即得**:粘贴链接即可获取无水印下载直链,无需手动操作或安装额外工具。 - **批量处理**:一次粘贴多个链接,逐个解析并在最后汇总成功和失败数量。 - **智能校验**:自动识别B站视频链接格式,非B站链接会提示重新输入,避免无效操作。 **适用对象** - 🎬 **内容创作者** — 快速获取无水印素材,直接进入剪辑流程。 - 📦 **视频收藏者** — 将喜欢的B站视频保存到本地,永久留存。 - 📊 **运营分析人员** — 离线反复观看爆款视频,拆解内容逻辑。 --- ## 功能特性 ### 核心功能 - **无水印直链**:返回的视频下载链接不含水印,下载即用。 - **批量解析**:支持多个链接一次性提交,逐个处理并汇总结果。 - **智能链接校验**:自动识别 www.bilibili.com 网页链接与 b23.tv 短链,非B站链接即时提示。 - **结果直出**:解析完成直接返回下载链接和封面图,复制到浏览器或下载工具即可保存。 --- ## 密钥获取与安全说明 - 本技能需要使用环境变量:`REDFOX_API_KEY`。 - `REDFOX_API_KEY` 由 [红狐 hub](https://redfox.hk/settings/api-keys?source=github) (`https://redfox.hk`)提供。 - 请前往 [红狐 hub](https://redfox.hk?source=github) 注册账号,获取 `REDFOX_API_KEY`。 - 配置设备环境变量 `REDFOX_API_KEY` 后使用本技能。 - 在提供密钥前,请先确认密钥来源、可用范围、有效期及是否支持重置/撤销。 - 禁止在代码、提示词、日志或输出文件中硬编码/明文暴露密钥。 --- ## 使用指南 直接用自然语言描述需求,无需记忆命令。 ### 常用说法速查 | 意图 | 示例话术 | 效果 | |------|----------|------| | 下载单个视频 | 「下载这个视频 https://www.bilibili.com/video/BVxxxxxx」 | 解析链接并返回无水印下载直链 | | 批量下载 | 「下载这几个视频 链接1 链接2 链接3」 | 逐个解析每个链接,最后汇总结果 | | 保存视频 | 「帮我把这条B站视频存下来」 | 引导贴上链接,解析后返回下载链接 | ### 输出示例 提交B站视频链接后,你将收到如下格式的结果: ``` 内容描述: <视频标题> | 项目 | 详情 | | --- | --- | | 视频 | 下载链接 | | 封面图 | 查看封面 | > ⚠️ 视频下载链接有效期约 5 分钟,请立即复制到浏览器打开或下载! ``` --- ## 使用场景 | 场景 | 角色 | 示例问法 | 收益 | |------|------|----------|------| | 素材收集 | 剪辑师 | 「下载这条B站视频」 | 快速拿到无水印素材,直接进剪辑流程 | | 内容备份 | 收藏者 | 「保存这个B站视频」 | 原视频删除也不怕,本地永久留存 | | 热点分析 | 运营 | 「把这个爆款视频下下来」 | 离线反复观看,拆解爆款逻辑 | -
SKILL.md 4.1 KB
--- name: bilibili-video-downloader description: B站视频下载 — 粘贴B站视频链接,一键解析返回无水印视频下载链接。当用户需要下载B站视频、保存B站视频、获取B站视频直链时使用。触发词:B站视频下载、bilibili视频下载、B站视频解析、下载B站视频、哔哩哔哩视频下载。 --- # B站视频下载 粘贴B站视频链接,一键获取无水印视频下载直链。通过 [redfox.hk](https://redfox.hk/settings/api-keys?source=github) 服务解析,支持单个或批量链接处理,自动识别并校验B站视频链接。 --- ## 简介 **适用对象**:需要下载B站视频的用户,包括内容创作者、视频收藏者、运营分析人员。 **核心能力**: - 📹 粘贴B站链接即可获取无水印 mp4 下载直链 - 📦 支持批量链接解析(空格分隔多个链接) - 🔍 自动校验是否为B站视频链接,非B站链接会提示重新输入 - 🎬 返回视频下载链接、封面链接,复制到浏览器或下载工具即可保存 --- ## 功能特性 | 功能 | 说明 | |------|------| | **无水印直链** | 自动返回无水印视频下载链接,无需手动处理 | | **即贴即解析** | 粘贴视频链接即可,无需额外操作 | | **批量解析** | 支持一次粘贴多个链接,逐个解析并在最后汇总成功和失败数量 | | **智能校验** | 自动识别B站视频链接,非B站链接会提示重新输入 | | **链接自适应** | 支持 www.bilibili.com 网页链接与 b23.tv 短链两种格式 | | **结果直出** | 解析完成直接返回下载链接,复制即可用 | --- ## 一键安装 1. 前往 [redfox.hk](https://redfox.hk/settings/api-keys?source=github) 注册获取 API Key 2. 配置环境变量:`export REDFOX_API_KEY=ark_你的密钥` 3. 粘贴B站视频链接即可使用 --- ## 使用指南 > 核心执行流程详见 `references/core_workflow.md` 直接用自然语言描述需求,无需记忆命令。提供正确的B站视频链接时,直接执行解析并返回结果。 ### 常用说法速查 | 意图 | 示例话术 | 效果 | |------|----------|------| | 下载单个视频 | 「下载这个视频 https://www.bilibili.com/video/BVxxxxxx」 | 解析链接并返回无水印下载直链 | | 批量下载 | 「下载这几个视频 链接1 链接2 链接3」 | 逐个解析每个链接,最后汇总结果 | | 保存视频 | 「帮我把这条B站视频存下来」 | 引导贴上链接,解析后返回下载链接 | ### 支持的作品链接格式 | 平台 | 链接格式 | 示例 | |------|----------|------| | B站 | `https://www.bilibili.com/video/<BV号>` | PC 网页链接 / 手机分享链接 | | B站 | `https://b23.tv/<短码>` | 手机分享短链接 | --- ## 使用场景 | 场景 | 角色 | 示例问法 | 收益 | |------|------|----------|------| | 素材收集 | 剪辑师 | 「下载这条B站视频」 | 快速拿到无水印素材,直接进剪辑流程 | | 内容备份 | 收藏者 | 「保存这个B站视频」 | 原视频删除也不怕,本地永久留存 | | 热点分析 | 运营 | 「把这个爆款视频下下来」 | 离线反复观看,拆解爆款逻辑 | --- ## 常见问答 **Q:如何获取自己的 API Key?** A:前往 [redfox.hk](https://redfox.hk/settings/api-keys?source=github) 注册即可获取 Token。 **Q:下载的视频有水印吗?** A:没有。返回的是无水印视频直链。 **Q:可以批量解析多个链接吗?** A:可以。多个链接用空格分隔即可,会逐个解析并在最后汇总成功和失败数量。 **Q:输入了非B站链接会怎样?** A:会提示「该链接不是B站视频链接」并终止解析。请重新输入正确的B站视频链接(支持 www.bilibili.com 网页链接或 b23.tv 短链)。 **Q:链接提示解析失败怎么办?** A:确认链接是否完整、视频是否仍然存在、视频内容是否公开。私密视频或已删除视频无法解析。 --- ## 了解更多 本工具基于 [redfox.hk](https://redfox.hk/settings/api-keys?source=github) 的视频解析服务构建。前往官网查看更多功能和使用文档。
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.