dsh-bili-watch 0.2.19 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +4 -3
  2. package/package.json +78 -78
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # dsh-bili-watch
2
2
 
3
- 将一条 B 站视频变成模型能读的内容:元数据、评论、弹幕、AI 字幕、本地转写、抽帧 OCR。可作为 DSH 插件运行,也可直接当命令行工具。
3
+ 将一条 B 站视频变成模型能读的内容:元数据、评论、弹幕、AI 字幕、本地转写、抽帧 OCR。可作为 DSH 插件运行,也可直接当命令行工具。支持 `b23.tv` 短链与 av 号;抽帧缓存位置可自定义,见下面「插件面板」的「缓存位置」。
4
4
 
5
5
  取内容的顺序是先用文字(字幕或转写),文字不够则抽帧看画面。只读元数据、评论、弹幕、搜索、热榜不需要任何额外依赖;抽帧相关命令需要 ffmpeg,未安装会明确报错并指出装法。
6
6
 
@@ -145,7 +145,7 @@ macOS/Linux 的 ffmpeg 用系统包管理器装,脚本只给提示。其余目
145
145
 
146
146
  ## 单条链接软提示
147
147
 
148
- 用户的消息里只有一条 B 站视频链接(BV 号或 `b23.tv` 短链)时,插件往消息流里补一句提示,告诉 agent 有这条链接可读、`peek` 最便宜。它**不会**替用户调用工具,也不会自动跑起来——只是让「贴链接不说话」这种场景不容易被漏掉。
148
+ 用户的消息里只有一条 B 站视频链接(BV 号或 `b23.tv` 短链)时,插件往消息流里补一句提示,告诉 agent 有这条链接可读、`peek` 最便宜。它**不会**替用户调用工具,也不会自动跑起来;作用只是让「贴链接不说话」这种场景不容易被漏掉。
149
149
 
150
150
  - `b23.tv` 短链会先自动展开:问公共 DNS(`223.5.5.5` → `119.29.29.29` → `1.1.1.1`)拿真实 IP,再直连读 302 里的 BV 号,绕开系统 DNS;展开失败才提示用户换成浏览器地址栏里的完整链接。
151
151
  - 为什么要兜底:部分内网 DNS 会把 `b23.tv` 答成 `31.13.x.x`(Facebook 段),这种环境下只有公共 DNS 这条路能展开(2026-10-23 实测)。
@@ -191,13 +191,14 @@ AI 字幕(需登录)
191
191
  | `BILI_WATCH_FFMPEG` | ffmpeg 可执行文件路径 |
192
192
  | `BILI_WATCH_YTDLP` | yt-dlp 可执行文件路径 |
193
193
  | `BILI_WATCH_SEEN` | `seen.md` 去重文件路径(默认 `deps/seen.md`)。文件不存在时 `--mark-seen` 记不了,先建一个空文件即可 |
194
+ | `BILI_WATCH_CACHE` | 抽帧缓存目录(默认系统临时目录)。优先级:这个变量 > `deps/deps-config.json` 的 `cache` > 临时目录;目录不可写时自动回退临时目录,并在面板警告里写明原因 |
194
195
  | `BILI_WATCH_MIRROR` | `cn` 时 `scripts/fetch-deps.*` 走镜像下载(gh-proxy / 清华 PyPI / hf-mirror) |
195
196
  | `HF_ENDPOINT` | 转写模型的 HuggingFace 端,默认 `https://hf-mirror.com`;海外可设官方站 |
196
197
  | `BILI_ASR_MODEL` | 本地转写用的 faster-whisper 模型名,默认 `small` |
197
198
 
198
199
  ## 成本
199
200
 
200
- - 字幕接口带一次重试;`text` 最多次试两次(先匿名、有凭证再试一次)。
201
+ - 字幕接口带一次重试;`text` 最多尝试两次(先匿名,有凭证再试一次)。
201
202
  - 抽帧会下载视频(360p)并跑 ffmpeg。`--step` 的秒数调大能减少抽帧数,脚本另外限了 `-threads 2`。
202
203
  - 拼图和字幕带把多帧压成一张图,省 token。
203
204
 
package/package.json CHANGED
@@ -1,78 +1,78 @@
1
- {
2
- "name": "dsh-bili-watch",
3
- "version": "0.2.19",
4
- "private": false,
5
- "description": "Reads Bilibili (and generic URLs via yt-dlp) into text for DSH agents: search, hot, metadata, comments, danmaku, AI subtitles, local ASR, frame OCR.",
6
- "type": "module",
7
- "main": "index.js",
8
- "bin": {
9
- "bili-watch": "tools/look.mjs"
10
- },
11
- "exports": {
12
- ".": "./index.js",
13
- "./client": "./client.js",
14
- "./cordis.patch.yml": "./cordis.patch.yml",
15
- "./package.json": "./package.json"
16
- },
17
- "dsh": {
18
- "bundle": {
19
- "patch": "./cordis.patch.yml"
20
- },
21
- "client": {
22
- "platform": "web",
23
- "inject": [
24
- "@deepseek-ai/dsh-client-runtime",
25
- "@deepseek-ai/dsh-client-ui-settings"
26
- ]
27
- }
28
- },
29
- "files": [
30
- "index.js",
31
- "client.js",
32
- "cordis.patch.yml",
33
- "tools/",
34
- "scripts/",
35
- "deps/.gitkeep",
36
- "deps/_bili-asr.py",
37
- "auto-trigger.js",
38
- "LICENSE"
39
- ],
40
- "keywords": [
41
- "bilibili",
42
- "video",
43
- "asr",
44
- "ocr",
45
- "danmaku",
46
- "dsh",
47
- "deepseek",
48
- "subtitles"
49
- ],
50
- "author": "Sacredbluedragon",
51
- "license": "MIT",
52
- "repository": {
53
- "type": "git",
54
- "url": "git+https://github.com/Sacredbluedragon/dsh-bili-watch.git"
55
- },
56
- "bugs": {
57
- "url": "https://github.com/Sacredbluedragon/dsh-bili-watch/issues"
58
- },
59
- "homepage": "https://github.com/Sacredbluedragon/dsh-bili-watch#readme",
60
- "engines": {
61
- "node": "\u003e=22"
62
- },
63
- "dependencies": {
64
- "qrcode": "^1.5.4"
65
- },
66
- "peerDependencies": {
67
- "@deepseek-ai/dsh": "\u003e=0.2.0-rc.1 \u003c0.3.0-0",
68
- "@deepseek-ai/dsh-tools": "\u003e=0.2.0-rc.1 \u003c0.3.0-0"
69
- },
70
- "peerDependenciesMeta": {
71
- "@deepseek-ai/dsh": {
72
- "optional": true
73
- },
74
- "@deepseek-ai/dsh-tools": {
75
- "optional": true
76
- }
77
- }
78
- }
1
+ {
2
+ "name": "dsh-bili-watch",
3
+ "version": "0.2.21",
4
+ "private": false,
5
+ "description": "把 B 站视频读成文本给 DSH agent 用:元数据、评论、弹幕、字幕、本地转写、抽帧 OCR;支持 b23.tv 短链与 av 号,抽帧缓存目录可换。只读命令零依赖。",
6
+ "type": "module",
7
+ "main": "index.js",
8
+ "bin": {
9
+ "bili-watch": "tools/look.mjs"
10
+ },
11
+ "exports": {
12
+ ".": "./index.js",
13
+ "./client": "./client.js",
14
+ "./cordis.patch.yml": "./cordis.patch.yml",
15
+ "./package.json": "./package.json"
16
+ },
17
+ "dsh": {
18
+ "bundle": {
19
+ "patch": "./cordis.patch.yml"
20
+ },
21
+ "client": {
22
+ "platform": "web",
23
+ "inject": [
24
+ "@deepseek-ai/dsh-client-runtime",
25
+ "@deepseek-ai/dsh-client-ui-settings"
26
+ ]
27
+ }
28
+ },
29
+ "files": [
30
+ "index.js",
31
+ "client.js",
32
+ "cordis.patch.yml",
33
+ "tools/",
34
+ "scripts/",
35
+ "deps/.gitkeep",
36
+ "deps/_bili-asr.py",
37
+ "auto-trigger.js",
38
+ "LICENSE"
39
+ ],
40
+ "keywords": [
41
+ "bilibili",
42
+ "video",
43
+ "asr",
44
+ "ocr",
45
+ "danmaku",
46
+ "dsh",
47
+ "deepseek",
48
+ "subtitles"
49
+ ],
50
+ "author": "Sacredbluedragon",
51
+ "license": "MIT",
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "git+https://github.com/Sacredbluedragon/dsh-bili-watch.git"
55
+ },
56
+ "bugs": {
57
+ "url": "https://github.com/Sacredbluedragon/dsh-bili-watch/issues"
58
+ },
59
+ "homepage": "https://github.com/Sacredbluedragon/dsh-bili-watch#readme",
60
+ "engines": {
61
+ "node": ">=22"
62
+ },
63
+ "dependencies": {
64
+ "qrcode": "^1.5.4"
65
+ },
66
+ "peerDependencies": {
67
+ "@deepseek-ai/dsh": ">=0.2.0-rc.1 <0.3.0-0",
68
+ "@deepseek-ai/dsh-tools": ">=0.2.0-rc.1 <0.3.0-0"
69
+ },
70
+ "peerDependenciesMeta": {
71
+ "@deepseek-ai/dsh": {
72
+ "optional": true
73
+ },
74
+ "@deepseek-ai/dsh-tools": {
75
+ "optional": true
76
+ }
77
+ }
78
+ }