← Back to Skills Marketplace
xiaohei2022

Kuaishou Bilibili Publish

by xiaohei2022 · GitHub ↗ · v1.0.4 · MIT-0
cross-platform ⚠ suspicious
94
Downloads
0
Stars
1
Active Installs
4
Versions
Install in OpenClaw
/install kuaishou-bilibili-publish
Description
通过浏览器自动化脚本实现快手、B站和抖音视频的批量上传、封面设置、标题与关键词填写和发布操作。
README (SKILL.md)

快手/B 站/抖音视频发布技能

🎯 技能概述

参考小红书发布技能(xiaohongshu-skills)的结构,为快手、B 站、抖音三个平台提供视频发布自动化能力。

目标平台:

  • 快手:https://cp.kuaishou.com/
  • B 站:https://member.bilibili.com/platform/upload/video/frame
  • 抖音:https://creator.douyin.com/creator-micro/content/upload

📝 2026-04-03 更新

快手平台特殊规则

关键词格式:

  • 快手最多支持 4 个关键词
  • 每个关键词前加 #,后加空格
  • 示例:#美好的 #欢快 #一天的

封面上传流程:

  1. 点击「封面设置」按钮
  2. 切换到「上传封面」标签
  3. 点击「上传图片」按钮选择文件
  4. 点击「确认」应用封面

作品描述框:

  • 标题和关键词写在同一个描述框中
  • 格式:标题 #关键词 1 #关键词 2 #关键词 3 #关键词 4

🔒 技能边界(强制)

所有发布操作只能通过浏览器自动化脚本完成:

  • 唯一执行方式:运行 python scripts/cli.py \x3C子命令> 控制 Chrome 浏览器
  • 禁止外部工具:不得调用第三方 API、MCP 工具或其他实现
  • 必须先有运行中的 Chrome,且用户已登录对应平台

📋 前置检查

登录状态检查

# 打开对应平台,手动检查登录状态
python scripts/cli.py --platform kuaishou check-login
python scripts/cli.py --platform bilibili check-login
python scripts/cli.py --platform douyin check-login
  • 未登录时提示用户扫码登录
  • 支持 --headless 模式(未登录自动降级到有窗口模式)

📥 输入格式

TXT 配置文件格式

标题:明天更好
视频数据路径:/Users/xiaohei/.openclaw/workspace/skills/kuaishou-bilibili-publish/test_data/test_video.mp4
封面:/Users/xiaohei/.openclaw/workspace/skills/kuaishou-bilibili-publish/test_data/image.png
关键词:美好的,欢快,一天的

字段说明:

  • 标题:视频标题(必填)
  • 视频数据路径:视频文件绝对路径(必填)
  • 封面:封面图片绝对路径(可选)
  • 关键词:逗号或空格分隔的关键词/标签(可选)

🚀 发布流程

流程 A: 单平台发布

快手发布

cd /Users/xiaohei/.openclaw/workspace/skills/kuaishou-bilibili-publish/scripts

# 完整发布(填写 + 点击发布)
python cli.py publish-kuaishou --config ../test_data/描述.txt

# 只填写表单,不发布(用于预览确认)
python cli.py publish-kuaishou --config ../test_data/描述.txt --no-publish

# 指定等待超时时间(秒)
python cli.py publish-kuaishou --config ../test_data/描述.txt --wait-timeout 600

B 站发布

# 完整发布
python cli.py publish-bilibili --config ../test_data/描述.txt

# 分步发布
python cli.py publish-bilibili --config ../test_data/描述.txt --no-publish
# 在浏览器中确认预览后,手动点击发布

抖音发布

# 完整发布
python cli.py publish-douyin --config ../test_data/描述.txt

# 指定 Chrome 端口
python cli.py publish-douyin --config ../test_data/描述.txt --port 9222

流程 B: 多平台一键发布

# 依次发布到快手、B 站、抖音
python cli.py publish-all --config ../test_data/描述.txt

# 带超时设置
python cli.py publish-all --config ../test_data/描述.txt --wait-timeout 300

注意: publish-all 会在同一浏览器会话中依次执行三个平台的发布,总耗时可能较长(每个平台约 1-3 分钟)。


🛠️ 常用参数

参数 说明 默认值
--config path TXT 配置文件路径(必须) -
--wait-timeout seconds 上传等待超时时间 300
--no-publish 只填写表单,不点击发布 false
--port PORT Chrome CDP 端口 9222
--host HOST Chrome CDP 主机 127.0.0.1
--headless 无头模式 false
--user-data-dir path Chrome 用户数据目录 ~/.kbs/chrome-profile

📤 输出格式

成功输出

{
  "success": true,
  "platform": "bilibili",
  "title": "明天更好",
  "video_path": "/path/to/video.mp4",
  "cover_path": "/path/to/cover.png",
  "keywords": ["美好的", "欢快", "一天的"],
  "status": "发布完成",
  "message": "视频上传成功,表单已填写"
}

失败输出

{
  "success": false,
  "platform": "kuaishou",
  "error": "上传超时,请检查网络连接或视频文件大小",
  "status": "上传失败"
}

⚠️ 失败处理

错误类型 可能原因 解决方案
上传超时 视频文件过大、网络慢 增加 --wait-timeout 参数
登录失效 Cookie 过期 重新登录对应平台
选择器失效 页面结构变更 更新 selectors_*.py 中的 CSS 选择器
文件不存在 路径错误 检查 TXT 配置中的文件路径
Chrome 未启动 调试端口未开放 确保 Chrome 以 --remote-debugging-port=9222 启动

📁 项目结构

kuaishou-bilibili-publish/
├── scripts/
│   ├── cli.py                     # CLI 入口(6.8KB)
│   ├── chrome_launcher.py         # Chrome 启动器(9KB)
│   ├── requirements.txt           # Python 依赖
│   └── kbs/                       # 核心模块
│       ├── __init__.py
│       ├── cdp.py                 # CDP 封装(22KB)
│       ├── types.py               # 数据类型 + 配置解析(4KB)
│       ├── selectors_ks.py        # 快手选择器(1.5KB)
│       ├── selectors_bili.py      # B 站选择器(1.1KB)
│       ├── selectors_dy.py        # 抖音选择器(859B)
│       ├── publish_kuaishou.py    # 快手发布逻辑(4.5KB)
│       ├── publish_bilibili.py    # B 站发布逻辑(4KB)
│       └── publish_douyin.py      # 抖音发布逻辑(4.5KB)
├── test_data/
│   ├── test_video.mp4             # 测试视频
│   ├── image.png                  # 测试封面
│   └── 描述.txt                   # 测试配置
├── 任务.md                        # 任务需求文档
└── SKILL.md                       # 技能说明文档(本文件)

🎯 实现状态

✅ 已完成:

  • CLI 入口和参数解析
  • Chrome 连接和会话管理
  • 三平台选择器定义
  • 视频上传(使用 CDP DOM.setFileInputFiles)
  • 封面上传
  • 标题/关键词填写
  • 上传状态轮询(最多 5 分钟)
  • 单平台/多平台发布模式

⚠️ 待完善:

  • 实际页面选择器需要验证(不同时间页面结构可能变化)
  • 视频上传进度监控需要实际测试优化
  • 分区选择功能(B 站)需要实现
  • 定时发布功能需要实现
  • 封面上传功能需要实际测试

📝 注意事项

  1. CSS 选择器:基于常见页面结构推断,实际使用时可能需要根据目标网站的最新页面结构调整
  2. 视频上传:大文件上传时间较长,建议设置 --wait-timeout 600 或更长
  3. 登录状态:发布前请确保已在 Chrome 中登录对应平台
  4. 浏览器复用:使用 --port 9222 可复用已登录的 Chrome 会话
  5. 错误处理:上传失败时会抛出异常并返回错误信息

🔧 依赖安装

cd /Users/xiaohei/.openclaw/workspace/skills/kuaishou-bilibili-publish/scripts
pip install -r requirements.txt
# 或手动安装
pip install requests websockets

开发时间: 2026-04-02
参考技能: xiaohongshu-skills/xhs-publish
开发工具: Cursor CLI Agent

Usage Guidance
This skill will control a Chrome browser (yours or one it starts), upload files you point it at, and act using whatever accounts are logged into that browser. That behavior is necessary for its purpose but is powerful: only run it with a browser/profile you trust or use a dedicated disposable profile (use --user-data-dir to point to an isolated profile). Run first with --no-publish to verify form filling before allowing actual publish. Review the STEALTH_JS/STEALTH_ARGS in chrome_launcher.py if you have policy or fingerprinting concerns, and inspect the code locally before installing. Finally, install dependencies in a controlled environment (virtualenv) and avoid reusing your primary Chrome profile unless you accept the script acting on your behalf.
Capability Analysis
Type: OpenClaw Skill Name: kuaishou-bilibili-publish Version: 1.0.4 The skill bundle provides automated video publishing for Kuaishou, Bilibili, and Douyin by controlling a Chrome browser via the Chrome DevTools Protocol (CDP). It utilizes high-risk capabilities including launching and killing system processes (chrome_launcher.py), direct filesystem access for reading media and configuration files (types.py), and injecting stealth JavaScript to bypass platform anti-bot detections (cdp.py). While these actions are plausibly necessary for the stated purpose of browser automation, the combination of low-level browser control, process management, and evasion techniques meets the threshold for a suspicious classification under the provided criteria. No evidence of intentional malice, such as data exfiltration or credential theft, was detected.
Capability Assessment
Purpose & Capability
Name/description match the implementation: CLI + CDP-based browser automation for Kuaishou, Bilibili, and Douyin. The code implements upload, cover setting, title/keyword filling and publish flows, and the CLI and parameters in SKILL.md line up with the scripts.
Instruction Scope
SKILL.md restricts actions to local browser automation via python scripts and the code follows that: navigation, file-input setting, element interaction, and saving debug HTML. The skill asks the user to provide local file paths and a running Chrome (or to launch one via the provided launcher). There are no hidden external endpoints or calls to third‑party web APIs beyond connecting to Chrome and the target sites.
Install Mechanism
No unusual install mechanism in the registry; dependencies are standard PyPI packages (requests, websockets). There is no remote download of arbitrary archives or execution of code from untrusted URLs in the install spec.
Credentials
The skill declares no required environment variables, which is reasonable. The code will, however, read optional env vars (CHROME_BIN, KBS_PROXY, HTTPS_PROXY/HTTP_PROXY) and uses or creates a browser profile (default ~/.kbs/chrome-profile) and/or connects to an existing Chrome debug port. It therefore has access to whatever browser profile/cookies you point it at (so it can act as any logged-in user). This is proportionate to a browser-automation uploader but is a privacy/authority risk you should consider.
Persistence & Privilege
The skill does not request always:true and does not declare system-wide persistent privileges. It may start or kill Chrome processes and will reuse or create a Chrome user-data-dir (default ~/.kbs/chrome-profile). Running it with your regular Chrome profile or reusing an active debug port grants the scripts the ability to act with your logged-in sessions — expected for this use case, but operationally powerful.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install kuaishou-bilibili-publish
  3. After installation, invoke the skill by name or use /kuaishou-bilibili-publish
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.4
恢复文件夹名称为 kuaishou-bilibili-publish,更新所有路径引用
v1.0.2
快手发布功能测试通过,添加 pyproject.toml 配置文件
v1.0.1
快手发布功能测试通过,添加 pyproject.toml 配置文件
v1.0.0
kuaishou-bilibili-publish v1.0.0 released — multi-platform video publishing automation for Kuaishou, Bilibili, and Douyin. - Provides browser-automation-based CLI tools to publish videos to Kuaishou, Bilibili, and Douyin. - Supports configurable text files for input (title, video path, cover, keywords). - Implements platform-specific rules (e.g., Kuaishou hashtag format and cover upload flow). - Offers both single-platform and one-click multi-platform publishing modes. - Includes detailed error reporting and status outputs in JSON. - Requires manual login via Chrome; all actions performed through browser automation.
Metadata
Slug kuaishou-bilibili-publish
Version 1.0.4
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 4
Frequently Asked Questions

What is Kuaishou Bilibili Publish?

通过浏览器自动化脚本实现快手、B站和抖音视频的批量上传、封面设置、标题与关键词填写和发布操作。 It is an AI Agent Skill for Claude Code / OpenClaw, with 94 downloads so far.

How do I install Kuaishou Bilibili Publish?

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

Is Kuaishou Bilibili Publish free?

Yes, Kuaishou Bilibili Publish is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Kuaishou Bilibili Publish support?

Kuaishou Bilibili Publish is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Kuaishou Bilibili Publish?

It is built and maintained by xiaohei2022 (@xiaohei2022); the current version is v1.0.4.

💬 Comments