koishi-plugin-video-parser-all 0.4.0 → 0.4.1

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/lib/index.js +54 -54
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -15,71 +15,71 @@ const worker_threads_1 = require("worker_threads");
15
15
  exports.name = 'video-parser-all';
16
16
  exports.Config = koishi_1.Schema.intersect([
17
17
  koishi_1.Schema.object({
18
- enable: koishi_1.Schema.boolean().default(true),
19
- botName: koishi_1.Schema.string().default('视频解析机器人'),
20
- showWaitingTip: koishi_1.Schema.boolean().default(true),
21
- waitingTipText: koishi_1.Schema.string().default('正在解析视频,请稍候...'),
22
- sameLinkInterval: koishi_1.Schema.number().min(0).default(180),
23
- maxVideoSize: koishi_1.Schema.number().min(0).default(50),
24
- downloadThreads: koishi_1.Schema.number().min(0).default(4),
25
- }),
18
+ enable: koishi_1.Schema.boolean().default(true).description('是否启用视频解析插件'),
19
+ botName: koishi_1.Schema.string().default('视频解析机器人').description('机器人显示名称'),
20
+ showWaitingTip: koishi_1.Schema.boolean().default(true).description('解析时显示等待提示'),
21
+ waitingTipText: koishi_1.Schema.string().default('正在解析视频,请稍候...').description('等待提示文本内容'),
22
+ sameLinkInterval: koishi_1.Schema.number().min(0).default(180).description('相同链接重复解析间隔(秒)'),
23
+ maxVideoSize: koishi_1.Schema.number().min(0).default(50).description('允许发送的最大视频大小(MB)'),
24
+ downloadThreads: koishi_1.Schema.number().min(0).default(4).description('视频下载线程数'),
25
+ }).description('基础设置'),
26
26
  koishi_1.Schema.object({
27
27
  platformEnable: koishi_1.Schema.object({
28
- bilibili: koishi_1.Schema.boolean().default(true),
29
- douyin: koishi_1.Schema.boolean().default(true),
30
- kuaishou: koishi_1.Schema.boolean().default(true),
31
- xigua: koishi_1.Schema.boolean().default(true),
32
- xiaohongshu: koishi_1.Schema.boolean().default(true),
33
- weibo: koishi_1.Schema.boolean().default(true),
34
- toutiao: koishi_1.Schema.boolean().default(true),
35
- pipigx: koishi_1.Schema.boolean().default(true),
36
- pipixia: koishi_1.Schema.boolean().default(true),
37
- zuiyou: koishi_1.Schema.boolean().default(true),
38
- })
39
- }),
28
+ bilibili: koishi_1.Schema.boolean().default(true).description('B站'),
29
+ douyin: koishi_1.Schema.boolean().default(true).description('抖音'),
30
+ kuaishou: koishi_1.Schema.boolean().default(true).description('快手'),
31
+ xigua: koishi_1.Schema.boolean().default(true).description('西瓜视频'),
32
+ xiaohongshu: koishi_1.Schema.boolean().default(true).description('小红书'),
33
+ weibo: koishi_1.Schema.boolean().default(true).description('微博'),
34
+ toutiao: koishi_1.Schema.boolean().default(true).description('今日头条'),
35
+ pipigx: koishi_1.Schema.boolean().default(true).description('皮皮搞笑'),
36
+ pipixia: koishi_1.Schema.boolean().default(true).description('皮皮虾'),
37
+ zuiyou: koishi_1.Schema.boolean().default(true).description('最右'),
38
+ }).description('启用平台(勾选即开启对应平台解析)')
39
+ }).description('平台开关'),
40
40
  koishi_1.Schema.object({
41
41
  platformFormat: koishi_1.Schema.object({
42
- bilibili: koishi_1.Schema.string().role('textarea').default('标题:${标题}\nUP主:${作者}\n简介:${简介}\n时长:${视频时长}\n点赞:${点赞数}\n投币:${投币数}\n收藏:${收藏数}\n转发:${转发数}'),
43
- douyin: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n点赞:${点赞数}\n收藏:${收藏数}\n转发:${转发数}'),
44
- kuaishou: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n点赞:${点赞数}\n播放:${播放数}\n转发:${转发数}'),
45
- xigua: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n播放:${播放数}\n点赞:${点赞数}\n视频大小:${视频大小}MB'),
46
- xiaohongshu: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}'),
47
- weibo: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}'),
48
- toutiao: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}'),
49
- pipigx: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}'),
50
- pipixia: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}'),
51
- zuiyou: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}'),
52
- })
53
- }),
42
+ bilibili: koishi_1.Schema.string().role('textarea').default('标题:${标题}\nUP主:${作者}\n简介:${简介}\n时长:${视频时长}\n点赞:${点赞数}\n投币:${投币数}\n收藏:${收藏数}\n转发:${转发数}').description('B站消息格式'),
43
+ douyin: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n点赞:${点赞数}\n收藏:${收藏数}\n转发:${转发数}').description('抖音消息格式'),
44
+ kuaishou: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n点赞:${点赞数}\n播放:${播放数}\n转发:${转发数}').description('快手消息格式'),
45
+ xigua: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n播放:${播放数}\n点赞:${点赞数}\n视频大小:${视频大小}MB').description('西瓜视频消息格式'),
46
+ xiaohongshu: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}').description('小红书消息格式'),
47
+ weibo: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}').description('微博消息格式'),
48
+ toutiao: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}').description('今日头条消息格式'),
49
+ pipigx: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}').description('皮皮搞笑消息格式'),
50
+ pipixia: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}').description('皮皮虾消息格式'),
51
+ zuiyou: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}').description('最右消息格式'),
52
+ }).description('各平台消息输出格式(支持${变量}占位符)')
53
+ }).description('消息格式'),
54
54
  koishi_1.Schema.object({
55
- showImageText: koishi_1.Schema.boolean().default(true),
56
- showVideoUrl: koishi_1.Schema.boolean().default(false),
57
- showVideoFile: koishi_1.Schema.boolean().default(true),
58
- }),
55
+ showImageText: koishi_1.Schema.boolean().default(true).description('显示图文内容'),
56
+ showVideoUrl: koishi_1.Schema.boolean().default(false).description('显示视频无水印链接'),
57
+ showVideoFile: koishi_1.Schema.boolean().default(true).description('发送视频文件(关闭则只发链接)'),
58
+ }).description('内容显示设置'),
59
59
  koishi_1.Schema.object({
60
- maxDescLength: koishi_1.Schema.number().default(200),
61
- }),
60
+ maxDescLength: koishi_1.Schema.number().default(200).description('简介内容最大长度(字符)'),
61
+ }).description('内容长度限制'),
62
62
  koishi_1.Schema.object({
63
- timeout: koishi_1.Schema.number().min(0).default(180000),
64
- videoSendTimeout: koishi_1.Schema.number().min(0).default(0),
65
- userAgent: koishi_1.Schema.string().default('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36'),
66
- bilibiliAccessKey: koishi_1.Schema.string().default(''),
67
- }),
63
+ timeout: koishi_1.Schema.number().min(0).default(180000).description('API请求超时时间(毫秒)'),
64
+ videoSendTimeout: koishi_1.Schema.number().min(0).default(0).description('视频发送超时时间(毫秒,0为不限制)'),
65
+ userAgent: koishi_1.Schema.string().default('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36').description('请求UA标识'),
66
+ bilibiliAccessKey: koishi_1.Schema.string().default('').description('B站AccessKey(可选,用于高级解析)'),
67
+ }).description('网络与API设置'),
68
68
  koishi_1.Schema.object({
69
- ignoreSendError: koishi_1.Schema.boolean().default(true),
70
- retryTimes: koishi_1.Schema.number().min(0).default(0),
71
- retryInterval: koishi_1.Schema.number().min(0).default(0),
72
- }),
69
+ ignoreSendError: koishi_1.Schema.boolean().default(true).description('忽略发送失败错误'),
70
+ retryTimes: koishi_1.Schema.number().min(0).default(0).description('API请求重试次数'),
71
+ retryInterval: koishi_1.Schema.number().min(0).default(0).description('重试间隔时间(毫秒)'),
72
+ }).description('错误与重试设置'),
73
73
  koishi_1.Schema.object({
74
- enableForward: koishi_1.Schema.boolean().default(false),
75
- downloadVideoBeforeSend: koishi_1.Schema.boolean().default(false),
76
- }),
74
+ enableForward: koishi_1.Schema.boolean().default(false).description('启用合并转发(仅OneBot平台)'),
75
+ downloadVideoBeforeSend: koishi_1.Schema.boolean().default(false).description('发送前先下载视频(避免链接失效)'),
76
+ }).description('发送方式设置'),
77
77
  koishi_1.Schema.object({
78
- messageBufferDelay: koishi_1.Schema.number().min(0).default(0),
79
- }),
78
+ messageBufferDelay: koishi_1.Schema.number().min(0).default(0).description('消息缓冲延迟(毫秒,批量处理链接)'),
79
+ }).description('消息处理设置'),
80
80
  koishi_1.Schema.object({
81
- autoClearCacheInterval: koishi_1.Schema.number().min(0).default(0),
82
- }),
81
+ autoClearCacheInterval: koishi_1.Schema.number().min(0).default(0).description('自动清理缓存间隔(分钟,0为关闭)'),
82
+ }).description('缓存清理设置'),
83
83
  ]);
84
84
  if (!worker_threads_1.isMainThread) {
85
85
  const workerDataTyped = worker_threads_1.workerData;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-video-parser-all",
3
3
  "description": "Koishi 全平台视频解析插件,支持抖音/快手/B站/小红书/微博/今日头条/皮皮搞笑/皮皮虾/西瓜视频/最右视频链接解析",
4
- "version": "0.4.0",
4
+ "version": "0.4.1",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [