koishi-plugin-video-parser-all 0.8.7 → 0.8.8
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.
- package/package.json +1 -1
- package/readme.md +21 -40
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -8,9 +8,8 @@
|
|
|
8
8
|
- 🤖 自动识别链接来源,即丢即用
|
|
9
9
|
- 🎨 完全自定义的解析结果格式,支持多项变量替换
|
|
10
10
|
- 🐛 内置Debug调试模式,可详细记录所有操作与API交互日志
|
|
11
|
-
- ⚡ 防重复解析、API重试、本地视频下载、多线程加速等实用功能
|
|
12
11
|
- 📤 支持OneBot平台消息合并转发,优化多图文展示体验
|
|
13
|
-
-
|
|
12
|
+
- 💬 所有提示文案均可自定义,适配多语言场景
|
|
14
13
|
|
|
15
14
|
### English
|
|
16
15
|
This is a **multi-platform video/image parsing plugin** developed for the Koishi bot framework, using a unified API interface to automatically recognize and parse short video/image/live photo links from 20+ mainstream platforms such as Douyin, Kuaishou, Bilibili, Xiaohongshu, Weibo, YouTube, TikTok, Jianying, AcFun, Zhihu, Huya and more. Core features:
|
|
@@ -18,9 +17,8 @@ This is a **multi-platform video/image parsing plugin** developed for the Koishi
|
|
|
18
17
|
- 🤖 Auto-detection of link sources, just drop & go
|
|
19
18
|
- 🎨 Fully customizable parsing result format with variable substitutions
|
|
20
19
|
- 🐛 Built-in Debug mode, recording detailed operations and API interaction logs
|
|
21
|
-
- ⚡ Duplicate parsing prevention, API retry, local video download, multithread acceleration
|
|
22
20
|
- 📤 Support OneBot message forwarding for better image/video display
|
|
23
|
-
-
|
|
21
|
+
- 💬 All prompt texts are customizable for multilingual scenarios
|
|
24
22
|
|
|
25
23
|
## 项目仓库 (Repository)
|
|
26
24
|
- GitHub: `https://github.com/Minecraft-1314/koishi-plugin-video-parser-all`
|
|
@@ -31,7 +29,6 @@ This is a **multi-platform video/image parsing plugin** developed for the Koishi
|
|
|
31
29
|
| 指令 (Command) | 说明 (Description) | 示例 (Example) |
|
|
32
30
|
|----------------|--------------------|----------------|
|
|
33
31
|
| `parse <url>` | 手动解析指定的视频/图集链接 | `parse https://v.douyin.com/xxxx/` |
|
|
34
|
-
| `clear-cache` | 清理解析缓存和临时下载的视频文件 | `clear-cache` |
|
|
35
32
|
|
|
36
33
|
## 配置项说明 (Configuration)
|
|
37
34
|
|
|
@@ -40,65 +37,49 @@ This is a **multi-platform video/image parsing plugin** developed for the Koishi
|
|
|
40
37
|
|--------|------|--------|------|
|
|
41
38
|
| `enable` | boolean | true | 是否启用视频解析插件 |
|
|
42
39
|
| `botName` | string | 视频解析机器人 | 合并转发消息中显示的机器人名称 |
|
|
43
|
-
| `showWaitingTip` | boolean | true |
|
|
44
|
-
| `
|
|
45
|
-
| `sameLinkInterval` | number | 180 | 相同链接重复解析间隔(秒),防止频繁解析 |
|
|
46
|
-
| `debug` | boolean | false | 是否开启Debug调试模式,控制台输出详细日志 |
|
|
47
|
-
| `debugFile` | boolean | false | 开启Debug时将日志同时写入本地`debug.log`文件 |
|
|
40
|
+
| `showWaitingTip` | boolean | true | 解析时是否显示等待提示 |
|
|
41
|
+
| `debug` | boolean | false | 是否开启 Debug 模式,在控制台输出详细日志 |
|
|
48
42
|
|
|
49
43
|
### 统一消息格式
|
|
50
44
|
| 配置项 | 类型 | 默认值 | 说明 |
|
|
51
45
|
|--------|------|--------|------|
|
|
52
|
-
| `unifiedMessageFormat` | string |
|
|
46
|
+
| `unifiedMessageFormat` | string | `\${标题}\n\${作者}\n\${简介}\n点赞:\${点赞数}\n收藏:\${收藏数}\n转发:\${转发数}\n播放:\${播放数}\n评论:\${评论数}` | 自定义解析结果的输出格式,支持变量替换 |
|
|
53
47
|
|
|
54
48
|
### 内容显示设置
|
|
55
49
|
| 配置项 | 类型 | 默认值 | 说明 |
|
|
56
50
|
|--------|------|--------|------|
|
|
57
|
-
| `showImageText` | boolean | true |
|
|
51
|
+
| `showImageText` | boolean | true | 是否发送解析后的文字内容 |
|
|
58
52
|
| `showVideoFile` | boolean | true | 是否发送视频文件(关闭则只发送视频链接) |
|
|
59
53
|
| `sendLivePhotoVideos` | boolean | true | 是否发送实况图片附带的短视频(仅 live_photo 类型) |
|
|
54
|
+
| `maxDescLength` | number | 200 | 简介内容最大长度(字符),超出自动截断 |
|
|
60
55
|
|
|
61
|
-
###
|
|
56
|
+
### 网络与 API 设置
|
|
62
57
|
| 配置项 | 类型 | 默认值 | 说明 |
|
|
63
58
|
|--------|------|--------|------|
|
|
64
|
-
| `
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
| 配置项 | 类型 | 默认值 | 说明 |
|
|
68
|
-
|--------|------|--------|------|
|
|
69
|
-
| `timeout` | number | 180000 | API请求超时时间(毫秒) |
|
|
70
|
-
| `videoSendTimeout` | number | 60000 | 视频消息发送超时时间(毫秒,0为不限制) |
|
|
71
|
-
| `userAgent` | string | Chrome 124 UA | API请求使用的User-Agent标识 |
|
|
59
|
+
| `timeout` | number | 180000 | API 请求超时时间(毫秒) |
|
|
60
|
+
| `videoSendTimeout` | number | 60000 | 视频消息发送超时时间(毫秒,0 为不限制) |
|
|
61
|
+
| `userAgent` | string | Chrome 124 UA | API 请求使用的 User-Agent |
|
|
72
62
|
|
|
73
63
|
### 错误与重试设置
|
|
74
64
|
| 配置项 | 类型 | 默认值 | 说明 |
|
|
75
65
|
|--------|------|--------|------|
|
|
76
|
-
| `ignoreSendError` | boolean | true |
|
|
77
|
-
| `retryTimes` | number | 3 | API请求失败时的重试次数 |
|
|
78
|
-
| `retryInterval` | number | 1000 |
|
|
66
|
+
| `ignoreSendError` | boolean | true | 是否忽略消息发送失败,避免插件崩溃 |
|
|
67
|
+
| `retryTimes` | number | 3 | API 请求失败时的重试次数 |
|
|
68
|
+
| `retryInterval` | number | 1000 | 重试间隔时间(毫秒) |
|
|
79
69
|
|
|
80
70
|
### 发送方式设置
|
|
81
71
|
| 配置项 | 类型 | 默认值 | 说明 |
|
|
82
72
|
|--------|------|--------|------|
|
|
83
|
-
| `enableForward` | boolean | false |
|
|
84
|
-
| `downloadVideoBeforeSend` | boolean | false | 发送前先下载视频到本地并发送文件 |
|
|
85
|
-
| `maxVideoSize` | number | 0 | 最大视频下载大小限制(MB,0为不限制) |
|
|
86
|
-
| `downloadThreads` | number | 0 | 多线程下载线程数(0为单线程,最大10) |
|
|
73
|
+
| `enableForward` | boolean | false | 是否启用合并转发(仅 OneBot 平台) |
|
|
87
74
|
|
|
88
|
-
###
|
|
75
|
+
### 界面文字设置
|
|
89
76
|
| 配置项 | 类型 | 默认值 | 说明 |
|
|
90
77
|
|--------|------|--------|------|
|
|
91
|
-
| `
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
|
95
|
-
|
|
96
|
-
| `autoClearCacheInterval` | number | 0 | 自动清理缓存间隔(分钟,0为关闭自动清理) |
|
|
97
|
-
|
|
98
|
-
## 缓存机制说明 (Cache Mechanism)
|
|
99
|
-
- 临时视频默认存放目录:项目根目录 `temp_videos`
|
|
100
|
-
- 支持定时自动清空缓存、手动执行 `clear-cache` 一键清理
|
|
101
|
-
- 自动清理过期解析记录、残留分段下载文件,避免磁盘占用
|
|
78
|
+
| `waitingTipText` | string | 正在解析视频,请稍候... | 解析等待提示文字 |
|
|
79
|
+
| `unsupportedPlatformText` | string | 不支持该平台链接 | 不支持的平台提示 |
|
|
80
|
+
| `invalidLinkText` | string | 无效的视频链接 | invalid link prompt (for parse command) |
|
|
81
|
+
| `parseErrorPrefix` | string | ❌ 解析失败: | 解析失败消息前缀 |
|
|
82
|
+
| `parseErrorItemFormat` | string | 【${url}】: ${msg} | 每条解析失败格式,可用 `${url}` `${msg}` |
|
|
102
83
|
|
|
103
84
|
## 支持的变量 (Supported Variables)
|
|
104
85
|
在 `unifiedMessageFormat` 中可使用以下变量进行自定义格式化:
|