Bilibili Upload 📺
Upload local video files to Bilibili (哔哩哔哩).
Features
- - Upload videos with custom title, description, and tags
- Support selecting different partitions (tid)
- Uses biliup for reliable uploading
- Handles Windows encoding issues automatically
Requirements
- - Python 3.8+
- INLINECODE0 package (installed automatically:
pip install biliup)
Installation
- 1. The skill will install biliup automatically on first use
- Run
biliup login in terminal to scan QR code and login - Login cookies are saved locally for future use
Usage
First Time Login (required once)
chcp 65001
$env:PYTHONIOENCODING = "utf-8"
biliup login
Scan the QR code with Bilibili App to login. Cookies are saved automatically for future use.
Basic Upload
CODEBLOCK1
Example (after login)
CODEBLOCK2
The script automatically handles:
- - Path expansion (supports
~ for home directory) - Windows UTF-8 encoding to avoid Unicode errors
- Error checking for missing video file
Common Partition IDs
生活 |
| 171 | 科技 |
| 95 | 娱乐 |
| 188 | 美食 |
| 208 | 影视 |
| 210 | 体育 |
| 201 | 动画 |
| 15 | 音乐 |
| 189 | 知识 |
Notes
- - On Windows, always set code page to UTF-8 before login/upload: INLINECODE4
- Set
PYTHONIOENCODING=utf-8 to avoid Unicode encoding errors - Login needs interactive terminal to display QR code, must do it manually once
- After login, cookies are saved automatically and future uploads can be automated
- If you don't see video immediately after upload, it's probably still in Bilibili's review queue
Script
The upload script is located at:
INLINECODE6
Where {skill_dir} is the installation directory of this skill. The script accepts any full path from the user, and automatically handles path expansion.
Bilibili 上传 📺
将本地视频文件上传至哔哩哔哩。
功能特点
- - 上传视频并支持自定义标题、描述和标签
- 支持选择不同分区(tid)
- 使用 biliup 实现可靠上传
- 自动处理 Windows 编码问题
环境要求
- - Python 3.8+
- biliup 包(自动安装:pip install biliup)
安装步骤
- 1. 首次使用时,技能将自动安装 biliup
- 在终端运行 biliup login 扫描二维码登录
- 登录 Cookie 将保存在本地以供后续使用
使用方法
首次登录(只需一次)
powershell
chcp 65001
$env:PYTHONIOENCODING = utf-8
biliup login
使用哔哩哔哩 App 扫描二维码登录。Cookie 将自动保存以供后续使用。
基础上传
powershell
chcp 65001
$env:PYTHONIOENCODING = utf-8
python {skill_dir}/upload.py ^
full/path/to/your/video.mp4 ^
--title 您的视频标题 ^
--desc 视频描述 ^
--tags 标签1,标签2,标签3 ^
--tid 138
示例(登录后)
powershell
python ~/.openclaw/workspace/skills/bilibili-upload/upload.py ^
C:\Users\hyzu\Documents\openclaw\news
briefing20260311.mp4 ^
--title 2026年3月11日新闻简报 ^
--desc 每日新闻简报,带金色字幕,AI自动生成 ^
--tags 新闻,每日新闻,简报,AI生成 ^
--tid 138
脚本会自动处理:
- - 路径扩展(支持 ~ 表示用户主目录)
- Windows UTF-8 编码以避免 Unicode 错误
- 视频文件缺失的错误检查
常用分区 ID
生活 |
| 171 | 科技 |
| 95 | 娱乐 |
| 188 | 美食 |
| 208 | 影视 |
| 210 | 体育 |
| 201 | 动画 |
| 15 | 音乐 |
| 189 | 知识 |
注意事项
- - 在 Windows 系统上,登录/上传前务必设置代码页为 UTF-8:chcp 65001
- 设置 PYTHONIOENCODING=utf-8 以避免 Unicode 编码错误
- 登录需要交互式终端显示二维码,必须手动操作一次
- 登录后 Cookie 会自动保存,后续上传可自动化执行
- 如果上传后未立即看到视频,可能仍在哔哩哔哩审核队列中
脚本文件
上传脚本位于:
{skill_dir}/upload.py
其中 {skill_dir} 是本技能的安装目录。脚本接受用户提供的任何完整路径,并自动处理路径扩展。