返回顶部
b

bilibili-playerB站视频播放器

B 站视频播放器。用 Playwright 搜索 B 站视频并获取准确链接,然后用 open 命令在当前浏览器打开播放。Use when users request to play Bilibili videos or search for specific content.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
776
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

bilibili-player

B 站视频播放器

功能

用 Playwright 无头浏览器搜索 B 站视频,获取准确链接后用系统 open 命令在用户当前浏览器打开播放。

使用场景

  • - 播放电影/电视剧(如:三国演义、电影名称)
  • 播放音乐/MV(如:伍佰 突然的自我)
  • 播放纪录片/教程
  • 任何需要在 B 站搜索并播放视频的场景

优势

  • - ✅ 准确 - Playwright 直接解析页面获取视频链接
  • 快速 - 无头模式搜索,不阻塞用户界面
  • 稳定 - 用用户浏览器播放,有音频、有登录状态、有 Cookie
  • 简单 - 一个命令完成搜索 + 打开

使用方法

基本用法

CODEBLOCK0

示例

CODEBLOCK1

工作流程

CODEBLOCK2

详细步骤

  1. 1. Playwright 搜索 - 无头 Chromium 访问 B 站搜索页面
  2. 解析页面 - 提取第一个视频卡片的链接
  3. open 打开 - 用 macOS open 命令在默认浏览器打开
  4. 播放 - 用户在浏览器中观看(有声音、有登录状态)

脚本说明

bilibili-player.py

Python 脚本,执行搜索和打开操作。

依赖:

  • - Python 3
  • Playwright (pip3 install playwright)

用法:
CODEBLOCK3

bilibili-player.sh

Shell 封装脚本,方便直接调用。

用法:
CODEBLOCK4

技术细节

Playwright 选择器

脚本使用以下选择器查找视频链接(按优先级):

CODEBLOCK5

链接处理

  • - 相对链接自动补全为完整 URL
  • 支持 // 开头的协议相对链接

错误处理

  • - 如果找不到视频,打开搜索页面
  • 超时时间:60 秒
  • 等待页面加载:3 秒

限制

  • - 仅支持 macOS(依赖 open 命令)
  • 需要安装 Playwright
  • 需要网络连接

扩展建议

如需支持其他平台:

  • - Linux: 用 xdg-open 替代 INLINECODE3
  • Windows: 用 start 替代 INLINECODE5

相关文件

  • - scripts/bilibili-player.py - 主脚本
  • INLINECODE7 - Shell 封装

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 bilibili-player-1776419957 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 bilibili-player-1776419957 技能

通过命令行安装

skillhub install bilibili-player-1776419957

下载

⬇ 下载 bilibili-player v1.0.0(免费)

文件大小: 3.34 KB | 发布时间: 2026-4-17 19:34

v1.0.0 最新 2026-4-17 19:34
- Initial release of bilibili-player: a tool for searching and playing Bilibili videos via Playwright and the open command on macOS.
- Supports movie, TV show, music, documentary, and tutorial searches using natural keywords.
- Ensures accurate video retrieval by parsing Bilibili search results directly.
- Automatically opens the found video in the user's current macOS browser with full login/cookie support.
- Includes Python and shell scripts for flexible command-line usage.
- Requires Python 3, Playwright, macOS, and network connection.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部