Turn a Bilibili creator channel into a local searchable knowledge base: list every video, transcribe locally with faster-whisper, run quality checks, then import the Markdown into a knowledge base. Weekly incremental sync only processes new videos.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:jiemixi/dsh-bili-kb
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
把一个 B 站 UP 主的全部视频,批量转成可检索的文字库,并长期自动跟进更新。
全程本地运行:音频不上传,转写不联网,只有导入知识库时才会调用你自己的 embedding 接口。
它能做什么
| 能力 | 说明 |
|---|---|
| 拉清单 | 读取 UP 主空间的全部视频(标题、时长、发布日期) |
| 批量转写 | 只下音轨,本地 faster-whisper 转写,自动检测语言 |
| 质量门禁 | 语言置信度 / 时长覆盖率 / 异常字符 / 复读率 / 文本密度 五项自检 |
| 增量同步 | 每周只处理新视频,已完成的跳过,断点续跑 |
| 导入知识库 | 自动上传到 DeepTutor 的指定知识库(可选) |
| 多 UP 主 | 改一个 JSON 配置即可扩展 |
提供的工具
| 工具 | 作用 |
|---|---|
bili_kb_list |
拉取某个 UP 主的完整视频清单 |
bili_kb_run |
后台启动转写(可限条数,可反复追加) |
bili_kb_status |
查看进度与质量报告 |
bili_kb_sync |
增量同步:检查新视频 → 转写 → 导入 DeepTutor |
bili_kb_env_check |
环境自检:Python / yt-dlp / 模型 / cookie |
安装
1. 准备环境
需要 Windows 10/11、Python 3.10+、DeepSeek Harness。
# 在插件目录下运行一次,自动创建虚拟环境、装依赖、下载模型
powershell -ExecutionPolicy Bypass -File assets\setup.ps1
它会:
- 在
%USERPROFILE%\.dsh\bili-kb\venv建独立环境 - 安装
yt-dlp(下载)和faster-whisper(转写) - 从国内模型站下载
faster-whisper-small(约 460MB)
2. 填 B 站 cookie
- 浏览器登录 B 站,按
F12 - 顶部「应用程序」→ 左侧「Cookie」→ 展开 → 点
https://www.bilibili.com - 找到
SESSDATA,复制它的值 - 粘贴进
%USERPROFILE%\.dsh\bili-kb\cookies-bili.txt(只放值)
3. 安装插件
在 DSH 的「插件」页 → 添加插件 → 选择本目录。
使用
用 bili_kb_list 拉这个 UP 主的清单:https://space.bilibili.com/1234567 ,库名 某某
用 bili_kb_run 跑 20 条
用 bili_kb_status 看进度
用 bili_kb_sync 同步一次
生成的 .md 在 <工作区>\bili-kb\<库名>\docs\。
每周自动同步
仓库提供 assets/sync.py + bili-kb/sync_task.ps1,可用 Windows 任务计划程序定时执行:
schtasks /create /tn "DSH-BiliKB-WeeklySync" ^
/tr "powershell -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File \"<工作区>\bili-kb\sync_task.ps1\"" ^
/sc WEEKLY /d SUN /st 10:00 /f
配置文件 bili-kb\sync.json:
{
"creators": [
{ "name": "AliAbdaal", "mid": "3546581580122806", "kb": "AliAbdaal" }
],
"device": "cuda",
"computeType": "float16",
"threads": 8
}
性能参考
| 配置 | 速度 |
|---|---|
| CPU(8 线程,int8) | 约 6 倍实时 |
| NVIDIA GPU(float16) | 约 19~20 倍实时 |
30 分钟视频:CPU 约 5 分钟,GPU 约 1.5 分钟。
已知限制
- 仅支持 B 站:抖音需要另一套签名与 cookie
- 只有原声语言:不会自动翻译;B 站视频的官方中文字幕嵌在画面里,OCR 成本高,未包含
- 会触发限速:B 站接口对连续请求敏感,插件已内置退避重试
- cookie 会过期:过期后
bili_kb_list会明确提示 - 导入 DeepTutor 需要它开着:没开时会顺延到下次同步
目录结构
bili-kb/
venv/ Python 环境
models/ 转写模型
cookies-bili.txt B 站 cookie
sync.json 创作者配置
sync.py 同步入口
sync_task.ps1 定时任务包装
<库名>/
jobs.jsonl 任务状态(断点续跑依据)
audio/ 音轨
docs/ 生成的 Markdown
subs/ 字幕 OCR 结果(可选)
许可
MIT
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38705
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37321
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
yikart/AiToEarn#dsh-plugin-aitoearn★ 28986
Generate copy, images and short videos, and publish with one click to Douyin, Kuaishou, Xiaohongshu, WeChat Official, Bilibili, Facebook, TikTok and more, covering the full content lifecycle from creation to publishing and monetization.
superdesigndev/treg★ 10137
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6125
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
Hithink-Tech-Org/Financial-API#hithink-finance★ 4781
Query Hithink Finance data in DeepSeek Harness, view charts in chat, and save refreshable dashboards.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.