koishi-plugin-video-parser-all 1.4.9 → 1.5.0
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/lib/index.js +25 -13
- package/package.json +1 -1
- package/readme.md +162 -158
package/lib/index.js
CHANGED
|
@@ -103,7 +103,7 @@ exports.Config = koishi_1.Schema.intersect([
|
|
|
103
103
|
}).description('各平台解析开关'),
|
|
104
104
|
}).description('基本设置'),
|
|
105
105
|
koishi_1.Schema.object({
|
|
106
|
-
unifiedMessageFormat: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}\n音乐标题:${音乐标题}\n音乐作者:${音乐作者}\n点赞:${点赞数}\n收藏:${收藏数}\n转发:${转发数}\n播放:${播放数}\n评论:${评论数}\n图片数量:${图片数量}').description('文字格式,支持变量:${标题} ${作者} ${
|
|
106
|
+
unifiedMessageFormat: koishi_1.Schema.string().role('textarea').default('标题:${标题}\n作者:${作者}\n简介:${简介}\n音乐标题:${音乐标题}\n音乐作者:${音乐作者}\n点赞:${点赞数}\n收藏:${收藏数}\n转发:${转发数}\n播放:${播放数}\n评论:${评论数}\n图片数量:${图片数量}').description('文字格式,支持变量:${标题} ${作者} ${简介} ${视频时长} ${点赞数} ${收藏数} ${转发数} ${播放数} ${评论数} ${发布时间} ${图片数量} ${作者ID} ${音乐标题} ${音乐作者},空行自动隐藏'),
|
|
107
107
|
}).description('消息格式'),
|
|
108
108
|
koishi_1.Schema.object({
|
|
109
109
|
showImageText: koishi_1.Schema.boolean().default(true).description('发送文字内容'),
|
|
@@ -647,7 +647,6 @@ function generateFormattedText(p, format) {
|
|
|
647
647
|
const vars = {
|
|
648
648
|
'标题': p.title,
|
|
649
649
|
'作者': p.author,
|
|
650
|
-
'author-name': p.author,
|
|
651
650
|
'简介': p.desc,
|
|
652
651
|
'视频时长': p.duration > 0 ? formatDuration(p.duration) : '',
|
|
653
652
|
'点赞数': String(p.like),
|
|
@@ -658,11 +657,8 @@ function generateFormattedText(p, format) {
|
|
|
658
657
|
'发布时间': p.publishTime ? formatPublishTime(p.publishTime) : '',
|
|
659
658
|
'图片数量': String(imageCount),
|
|
660
659
|
'作者ID': p.uid,
|
|
661
|
-
'author-id': p.uid,
|
|
662
660
|
'音乐标题': p.music.title || '',
|
|
663
|
-
'music-title': p.music.title || '',
|
|
664
661
|
'音乐作者': p.music.author || '',
|
|
665
|
-
'music-author': p.music.author || '',
|
|
666
662
|
};
|
|
667
663
|
const varReplacements = Object.entries(vars).map(([key, val]) => ({
|
|
668
664
|
regex: new RegExp(`\\$\\{${key}\\}`, 'g'),
|
|
@@ -893,7 +889,7 @@ function apply(ctx, config) {
|
|
|
893
889
|
lastProgressTime = Date.now();
|
|
894
890
|
const total = parseInt(status.totalLength) || 0;
|
|
895
891
|
const completed = parseInt(status.completedLength) || 0;
|
|
896
|
-
const percent = total > 0 ? Math.round((completed / total) * 100) :
|
|
892
|
+
const percent = total > 0 ? Math.round((completed / total) * 100) : -1;
|
|
897
893
|
const speed = formatSpeed(parseInt(status.downloadSpeed) || 0);
|
|
898
894
|
onProgress(percent, speed);
|
|
899
895
|
}
|
|
@@ -940,16 +936,27 @@ function apply(ctx, config) {
|
|
|
940
936
|
let lastProgressTime = 0;
|
|
941
937
|
response.data.on('data', (chunk) => {
|
|
942
938
|
downloaded += chunk.length;
|
|
943
|
-
if (onProgress &&
|
|
939
|
+
if (onProgress && Date.now() - lastProgressTime > 500) {
|
|
944
940
|
lastProgressTime = Date.now();
|
|
945
|
-
|
|
946
|
-
|
|
941
|
+
if (contentLength > 0) {
|
|
942
|
+
const percent = Math.round((downloaded / contentLength) * 100);
|
|
943
|
+
onProgress(percent, '');
|
|
944
|
+
}
|
|
945
|
+
else {
|
|
946
|
+
onProgress(-1, formatSpeed(downloaded / ((Date.now() - lastProgressTime) / 1000)));
|
|
947
|
+
}
|
|
947
948
|
}
|
|
948
949
|
});
|
|
949
950
|
try {
|
|
950
951
|
await (0, promises_2.pipeline)(response.data, writer);
|
|
951
|
-
if (onProgress)
|
|
952
|
-
|
|
952
|
+
if (onProgress) {
|
|
953
|
+
if (contentLength > 0) {
|
|
954
|
+
onProgress(100, '');
|
|
955
|
+
}
|
|
956
|
+
else {
|
|
957
|
+
onProgress(-1, formatSpeed(downloaded / ((Date.now() - lastProgressTime) / 1000)));
|
|
958
|
+
}
|
|
959
|
+
}
|
|
953
960
|
return filePath;
|
|
954
961
|
}
|
|
955
962
|
catch (e) {
|
|
@@ -983,8 +990,13 @@ function apply(ctx, config) {
|
|
|
983
990
|
const prefixMap = { image: 'img', video: 'video', audio: 'music' };
|
|
984
991
|
const sendFunc = type === 'audio' ? koishi_1.h.audio : type === 'video' ? koishi_1.h.video : koishi_1.h.image;
|
|
985
992
|
const onProgress = forceDownload ? (percent, speed) => {
|
|
986
|
-
|
|
987
|
-
|
|
993
|
+
if (percent === -1) {
|
|
994
|
+
logger.info(`下载进度: 已下载 ${speed}`);
|
|
995
|
+
}
|
|
996
|
+
else {
|
|
997
|
+
const text = `下载进度: ${percent}%` + (speed ? ` (${speed})` : '');
|
|
998
|
+
logger.info(text);
|
|
999
|
+
}
|
|
988
1000
|
} : undefined;
|
|
989
1001
|
if (forceDownload) {
|
|
990
1002
|
try {
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -20,185 +20,189 @@ This is a **multi-platform video/image parsing plugin** developed for the Koishi
|
|
|
20
20
|
|
|
21
21
|
## 配置项说明 (Configuration)
|
|
22
22
|
|
|
23
|
-
### 基本设置
|
|
24
|
-
| 配置项 | 类型 | 默认值 | 说明 |
|
|
25
|
-
|
|
26
|
-
| `enable` | boolean | true | 启用插件 |
|
|
27
|
-
| `botName` | string | 视频解析机器人 | 合并转发中的昵称 |
|
|
28
|
-
| `showWaitingTip` | boolean | true | 显示等待提示 |
|
|
29
|
-
| `debug` | boolean | false | Debug 日志 |
|
|
30
|
-
| `platformEnabled` | object | 全开 | 各平台开关 |
|
|
31
|
-
|
|
32
|
-
### 消息格式
|
|
33
|
-
| 配置项 | 类型 | 默认值 | 说明 |
|
|
34
|
-
|
|
35
|
-
| `unifiedMessageFormat` | string | 见预设 | 文字格式,支持变量,空行自动隐藏 |
|
|
36
|
-
|
|
37
|
-
### 媒体发送
|
|
38
|
-
| 配置项 | 类型 | 默认值 | 说明 |
|
|
39
|
-
|
|
40
|
-
| `showImageText` | boolean | true | 发送文字内容 |
|
|
41
|
-
| `showCoverImage` | boolean | true | 发送封面图片 |
|
|
42
|
-
| `showCoverFile` | boolean | true | 封面是否以图片形式发送(关闭则只发送链接) |
|
|
43
|
-
| `showImageFileNew` | boolean | true | 图片是否以图片形式发送(关闭则只发送链接) |
|
|
44
|
-
| `showAuthorAvatar` | boolean | true | 发送作者头像图片 |
|
|
45
|
-
| `showAuthorAvatarFile` | boolean | true | 作者头像图片是否以图片形式发送(关闭则只发送链接) |
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `forceDownloadAuthorAvatar` | boolean | false | 强制下载作者头像 |
|
|
53
|
-
| `forceDownloadVideo` | boolean | false | 强制下载视频 |
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
|
59
|
-
|
|
60
|
-
| `
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
|
66
|
-
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
|
76
|
-
|
|
77
|
-
| `timeout` | number | 180000 | API 超时 (ms) |
|
|
78
|
-
| `videoSendTimeout` | number | 180000 | 发送超时 (ms) |
|
|
23
|
+
### 基本设置 (Basic Settings)
|
|
24
|
+
| 配置项 (Config) | 类型 (Type) | 默认值 (Default) | 说明 (Description) |
|
|
25
|
+
|----------------|-------------|-------------------|---------------------|
|
|
26
|
+
| `enable` | boolean | true | 启用插件 (Enable plugin) |
|
|
27
|
+
| `botName` | string | 视频解析机器人 | 合并转发中的昵称 (Nickname in forward messages) |
|
|
28
|
+
| `showWaitingTip` | boolean | true | 显示等待提示 (Show waiting tip) |
|
|
29
|
+
| `debug` | boolean | false | Debug 日志 (Debug logging) |
|
|
30
|
+
| `platformEnabled` | object | 全开 (All enabled) | 各平台开关 (Platform switches) |
|
|
31
|
+
|
|
32
|
+
### 消息格式 (Message Format)
|
|
33
|
+
| 配置项 (Config) | 类型 (Type) | 默认值 (Default) | 说明 (Description) |
|
|
34
|
+
|----------------|-------------|-------------------|---------------------|
|
|
35
|
+
| `unifiedMessageFormat` | string | 见预设 (See preset) | 文字格式,支持变量,空行自动隐藏 (Text format, supports variables, auto-hide empty lines) |
|
|
36
|
+
|
|
37
|
+
### 媒体发送 (Media Sending)
|
|
38
|
+
| 配置项 (Config) | 类型 (Type) | 默认值 (Default) | 说明 (Description) |
|
|
39
|
+
|----------------|-------------|-------------------|---------------------|
|
|
40
|
+
| `showImageText` | boolean | true | 发送文字内容 (Send text content) |
|
|
41
|
+
| `showCoverImage` | boolean | true | 发送封面图片 (Send cover image) |
|
|
42
|
+
| `showCoverFile` | boolean | true | 封面是否以图片形式发送(关闭则只发送链接)(Send cover as image, otherwise link only) |
|
|
43
|
+
| `showImageFileNew` | boolean | true | 图片是否以图片形式发送(关闭则只发送链接)(Send images as image, otherwise link only) |
|
|
44
|
+
| `showAuthorAvatar` | boolean | true | 发送作者头像图片 (Send author avatar image) |
|
|
45
|
+
| `showAuthorAvatarFile` | boolean | true | 作者头像图片是否以图片形式发送(关闭则只发送链接)(Send author avatar as image, otherwise link only) |
|
|
46
|
+
| `showAuthorAvatarText` | boolean | true | 发送作者头像前显示文字提示 (Show text hint before author avatar) |
|
|
47
|
+
| `authorAvatarText` | string | 作者头像: | 作者头像前显示的文字 (Text displayed before author avatar) |
|
|
48
|
+
| `showMusicCover` | boolean | true | 发送音乐封面图片 (Send music cover image) |
|
|
49
|
+
| `showVideoFile` | boolean | true | 视频是否以视频形式发送(关闭则只发送链接)(Send video as file, otherwise link only) |
|
|
50
|
+
| `forceDownloadCover` | boolean | false | 强制下载封面 (Force download cover) |
|
|
51
|
+
| `forceDownloadImageNew` | boolean | false | 强制下载图片 (Force download images) |
|
|
52
|
+
| `forceDownloadAuthorAvatar` | boolean | false | 强制下载作者头像 (Force download author avatar) |
|
|
53
|
+
| `forceDownloadVideo` | boolean | false | 强制下载视频 (Force download video) |
|
|
54
|
+
|
|
55
|
+
### 音乐语音(需 silk 和 ffmpeg)(Music Voice - requires silk & ffmpeg)
|
|
56
|
+
| 配置项 (Config) | 类型 (Type) | 默认值 (Default) | 说明 (Description) |
|
|
57
|
+
|----------------|-------------|-------------------|---------------------|
|
|
58
|
+
| `showMusicVoice` | boolean | false | 音乐链接以语音发送 (Send music as voice) |
|
|
59
|
+
| `showMusicVoiceFile` | boolean | true | 音乐链接是否以语音形式发送(关闭则只发送链接)(Send as voice file, otherwise link only) |
|
|
60
|
+
| `forceDownloadMusicVoice` | boolean | false | 强制下载音乐语音 (Force download music voice) |
|
|
61
|
+
|
|
62
|
+
### 性能与限制 (Performance & Limits)
|
|
63
|
+
| 配置项 (Config) | 类型 (Type) | 默认值 (Default) | 说明 (Description) |
|
|
64
|
+
|----------------|-------------|-------------------|---------------------|
|
|
65
|
+
| `maxDescLength` | number | 200 | 简介长度上限 (Max description length) |
|
|
66
|
+
| `maxConcurrent` | number | 3 | 解析最大并发数 (Max concurrent parsing) |
|
|
67
|
+
| `downloadConcurrency` | number | 3 | 下载线程数 (Download concurrency) |
|
|
68
|
+
| `mediaDownloadTimeout` | number | 120000 | 统一下载超时 (ms) (Download timeout) |
|
|
69
|
+
| `maxMediaSize` | number | 0 | 最大下载文件大小 (MB),0 为不限制 (Max file size, 0 = unlimited) |
|
|
70
|
+
| `downloadEngine` | string | internal | 下载引擎(internal / aria2 / downloads)(Download engine) |
|
|
71
|
+
|
|
72
|
+
### 网络与请求 (Network & Request)
|
|
73
|
+
| 配置项 (Config) | 类型 (Type) | 默认值 (Default) | 说明 (Description) |
|
|
74
|
+
|----------------|-------------|-------------------|---------------------|
|
|
75
|
+
| `timeout` | number | 180000 | API 超时 (ms) (API timeout) |
|
|
76
|
+
| `videoSendTimeout` | number | 180000 | 发送超时 (ms) (Send timeout) |
|
|
79
77
|
| `userAgent` | string | 见预设 | User-Agent |
|
|
80
|
-
| `proxy` | object | ... | HTTP/HTTPS 代理 |
|
|
81
|
-
| `customHeaders` | array | [] | 自定义请求头 |
|
|
82
|
-
|
|
83
|
-
### 发送与重试
|
|
84
|
-
| 配置项 | 类型 | 默认值 | 说明 |
|
|
85
|
-
|
|
86
|
-
| `ignoreSendError` | boolean | true | 忽略发送失败 |
|
|
87
|
-
| `retryTimes` | number | 3 | 重试次数 |
|
|
88
|
-
| `retryInterval` | number | 1000 | 重试间隔 (ms) |
|
|
89
|
-
| `enableForward` | boolean | false | 合并转发(OneBot/Satori) |
|
|
90
|
-
|
|
91
|
-
### 缓存与临时文件
|
|
92
|
-
| 配置项 | 类型 | 默认值 | 说明 |
|
|
93
|
-
|
|
94
|
-
| `deduplicationInterval` | number | 180 | 去重间隔 (s) |
|
|
95
|
-
| `cacheTTL` | number | 600 | 缓存时间 (s) |
|
|
96
|
-
| `cacheDir` | string | ./temp_cache | 统一临时目录 |
|
|
97
|
-
|
|
98
|
-
### API 与平台
|
|
99
|
-
| 配置项 | 类型 | 默认值 | 说明 |
|
|
100
|
-
|
|
101
|
-
| `platformDedicatedFirst` | object | 全关 | 优先专属 API |
|
|
102
|
-
| `customApis` | array | [] | 覆盖内置平台 API |
|
|
103
|
-
| `customPlatforms` | array | [] | 自定义新平台 |
|
|
104
|
-
| `globalFieldMapping` | string | 预设 | 全局字段映射 JSON |
|
|
105
|
-
|
|
106
|
-
### 界面文本
|
|
107
|
-
| 配置项 | 类型 | 默认值 | 说明 |
|
|
108
|
-
|
|
109
|
-
| `waitingTipText` | string | 正在解析... | 等待提示 |
|
|
110
|
-
| `unsupportedPlatformText` | string | 不支持该平台 | 不支持提示 |
|
|
111
|
-
| `invalidLinkText` | string | 无效链接 | 无效链接提示 |
|
|
112
|
-
| `parseErrorPrefix` | string | ❌ 解析失败: | 错误前缀 |
|
|
113
|
-
| `parseErrorItemFormat` | string | ... | 错误格式 |
|
|
78
|
+
| `proxy` | object | ... | HTTP/HTTPS 代理 (Proxy) |
|
|
79
|
+
| `customHeaders` | array | [] | 自定义请求头 (Custom headers) |
|
|
80
|
+
|
|
81
|
+
### 发送与重试 (Send & Retry)
|
|
82
|
+
| 配置项 (Config) | 类型 (Type) | 默认值 (Default) | 说明 (Description) |
|
|
83
|
+
|----------------|-------------|-------------------|---------------------|
|
|
84
|
+
| `ignoreSendError` | boolean | true | 忽略发送失败 (Ignore send errors) |
|
|
85
|
+
| `retryTimes` | number | 3 | 重试次数 (Retry times) |
|
|
86
|
+
| `retryInterval` | number | 1000 | 重试间隔 (ms) (Retry interval) |
|
|
87
|
+
| `enableForward` | boolean | false | 合并转发(OneBot/Satori)(Enable forward message) |
|
|
88
|
+
|
|
89
|
+
### 缓存与临时文件 (Cache & Temp Files)
|
|
90
|
+
| 配置项 (Config) | 类型 (Type) | 默认值 (Default) | 说明 (Description) |
|
|
91
|
+
|----------------|-------------|-------------------|---------------------|
|
|
92
|
+
| `deduplicationInterval` | number | 180 | 去重间隔 (s) (Deduplication interval) |
|
|
93
|
+
| `cacheTTL` | number | 600 | 缓存时间 (s) (Cache TTL) |
|
|
94
|
+
| `cacheDir` | string | ./temp_cache | 统一临时目录 (Temp directory) |
|
|
95
|
+
|
|
96
|
+
### API 与平台 (API & Platforms)
|
|
97
|
+
| 配置项 (Config) | 类型 (Type) | 默认值 (Default) | 说明 (Description) |
|
|
98
|
+
|----------------|-------------|-------------------|---------------------|
|
|
99
|
+
| `platformDedicatedFirst` | object | 全关 (All off) | 优先专属 API (Prioritize dedicated APIs) |
|
|
100
|
+
| `customApis` | array | [] | 覆盖内置平台 API (Override built-in APIs) |
|
|
101
|
+
| `customPlatforms` | array | [] | 自定义新平台 (Custom platforms) |
|
|
102
|
+
| `globalFieldMapping` | string | 预设 (Preset) | 全局字段映射 JSON (Global field mapping JSON) |
|
|
103
|
+
|
|
104
|
+
### 界面文本 (UI Text)
|
|
105
|
+
| 配置项 (Config) | 类型 (Type) | 默认值 (Default) | 说明 (Description) |
|
|
106
|
+
|----------------|-------------|-------------------|---------------------|
|
|
107
|
+
| `waitingTipText` | string | 正在解析... | 等待提示 (Waiting tip) |
|
|
108
|
+
| `unsupportedPlatformText` | string | 不支持该平台 | 不支持提示 (Unsupported platform tip) |
|
|
109
|
+
| `invalidLinkText` | string | 无效链接 | 无效链接提示 (Invalid link tip) |
|
|
110
|
+
| `parseErrorPrefix` | string | ❌ 解析失败: | 错误前缀 (Error prefix) |
|
|
111
|
+
| `parseErrorItemFormat` | string | ... | 错误格式 (Error format) |
|
|
114
112
|
|
|
115
113
|
## 支持的变量 (Supported Variables)
|
|
116
|
-
在 `unifiedMessageFormat`
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
| `${
|
|
122
|
-
| `${
|
|
123
|
-
| `${
|
|
124
|
-
| `${
|
|
125
|
-
| `${
|
|
126
|
-
| `${
|
|
127
|
-
| `${
|
|
128
|
-
| `${
|
|
129
|
-
| `${
|
|
130
|
-
| `${
|
|
131
|
-
| `${
|
|
132
|
-
| `${
|
|
133
|
-
| `${
|
|
114
|
+
在 `unifiedMessageFormat` 中可使用以下变量,空行自动隐藏。
|
|
115
|
+
The following variables can be used in `unifiedMessageFormat`, empty lines are auto-hidden.
|
|
116
|
+
|
|
117
|
+
| 变量 (Variable) | 说明 (Description) |
|
|
118
|
+
|----------------|--------------------|
|
|
119
|
+
| `${标题}` | 视频/图集标题 (Title) |
|
|
120
|
+
| `${作者}` | 作者名称 (Author name) |
|
|
121
|
+
| `${简介}` | 内容简介 (Description) |
|
|
122
|
+
| `${视频时长}` | 视频时长(时:分:秒)(Duration, hh:mm:ss) |
|
|
123
|
+
| `${点赞数}` | 点赞数量 (Like count) |
|
|
124
|
+
| `${收藏数}` | 收藏数量 (Favorite count) |
|
|
125
|
+
| `${转发数}` | 转发/分享数量 (Share count) |
|
|
126
|
+
| `${播放数}` | 播放量 (Play count) |
|
|
127
|
+
| `${评论数}` | 评论数量 (Comment count) |
|
|
128
|
+
| `${发布时间}` | 发布时间(格式化)(Publish time, formatted) |
|
|
129
|
+
| `${图片数量}` | 图集/实况图片数量 (Image count) |
|
|
130
|
+
| `${作者ID}` | 作者唯一标识ID (Author ID) |
|
|
131
|
+
| `${音乐标题}` | 音乐标题 (Music title) |
|
|
132
|
+
| `${音乐作者}` | 音乐作者 (Music author) |
|
|
134
133
|
|
|
135
134
|
## 依赖说明 (Dependencies)
|
|
136
|
-
### 音乐语音(可选)
|
|
137
|
-
若启用 `showMusicVoice`,请安装:
|
|
138
|
-
|
|
139
|
-
- `koishi-plugin-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
###
|
|
143
|
-
若启用 `downloadEngine: '
|
|
135
|
+
### 音乐语音(可选)(Music Voice - Optional)
|
|
136
|
+
若启用 `showMusicVoice`,请安装:
|
|
137
|
+
If you enable `showMusicVoice`, please install:
|
|
138
|
+
- `koishi-plugin-silk`:silk 编解码 (Silk codec)
|
|
139
|
+
- `koishi-plugin-ffmpeg`:音频重采样 (Audio resampling)
|
|
140
|
+
|
|
141
|
+
### aria2 下载引擎(可选)(aria2 Download Engine - Optional)
|
|
142
|
+
若启用 `downloadEngine: 'aria2'`,请安装可选依赖 `koishi-plugin-aria2-plus` 并配置该插件连接 aria2 服务。插件启动时会自动检测该服务,未安装或不可用时将降级为内置下载,不影响正常使用。
|
|
143
|
+
If you use `downloadEngine: 'aria2'`, please install the optional dependency `koishi-plugin-aria2-plus` and configure it to connect to an aria2 service. The plugin will auto-detect it; if not available, it will fall back to the built-in downloader without affecting normal usage.
|
|
144
|
+
|
|
145
|
+
### downloads 服务(可选)(Downloads Service - Optional)
|
|
146
|
+
若启用 `downloadEngine: 'downloads'`,请安装可选依赖 `koishi-plugin-downloads`,失败时回退到内置下载。
|
|
147
|
+
If you use `downloadEngine: 'downloads'`, please install the optional dependency `koishi-plugin-downloads`. It will fall back to the built-in downloader on failure.
|
|
144
148
|
|
|
145
149
|
## 支持的平台 (Supported Platforms)
|
|
146
150
|
|
|
147
|
-
> 以下为插件内置链接匹配规则,可根据用户发送的链接自动识别。所有匹配规则同时支持 HTTP 和 HTTPS 协议,并兼容多级路径(如短链后带 `/` 子路径)。
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
|
|
|
158
|
-
|
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
|
|
|
162
|
-
|
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
|
|
|
174
|
-
|
|
|
175
|
-
|
|
|
176
|
-
|
|
|
177
|
-
|
|
|
151
|
+
> 以下为插件内置链接匹配规则,可根据用户发送的链接自动识别。所有匹配规则同时支持 HTTP 和 HTTPS 协议,并兼容多级路径(如短链后带 `/` 子路径)。
|
|
152
|
+
> The following are the built-in link matching rules, which can automatically identify links sent by users. All rules support both HTTP and HTTPS, and are compatible with multi-level paths (e.g., short links followed by `/` subpaths).
|
|
153
|
+
|
|
154
|
+
| 平台名称 (Platform) | 关键词识别(匹配的域名/路径模式)(Keyword/Domain Patterns) | 解析能力 (Supported Content) |
|
|
155
|
+
|---------------------|--------------------------------------------------------------|------------------------------|
|
|
156
|
+
| 哔哩哔哩 (B站) Bilibili | `bilibili.com/video/`, `b23.tv`, `bili*.cn`, `b23.wtf`, `bili2233.cn` | 视频 (Video) |
|
|
157
|
+
| 抖音 Douyin | `douyin.com/video/`, `v.douyin.com` | 短视频、图集、实况 (Short video, Image, Live photo) |
|
|
158
|
+
| 快手 Kuaishou | `kuaishou.com/short-video/`, `v.kuaishou.com`, `kuaishou.com/f/` | 短视频、图集 (Short video, Image) |
|
|
159
|
+
| 小红书 Xiaohongshu | `xiaohongshu.com/discovery/item/`, `xhslink.com`, `xiaohongshu.com/explore/`, `xiaohongshu.com/board/` | 图文、视频 (Image, Video) |
|
|
160
|
+
| 微博 Weibo | `weibo.com/数字/`, `video.weibo.com/show`, `t.cn`, `m.weibo.cn` | 视频、图集 (Video, Image) |
|
|
161
|
+
| 西瓜视频 Xigua | `ixigua.com` | 短视频 (Short video) |
|
|
162
|
+
| YouTube | `youtube.com/watch`, `youtu.be`, `youtube.com/shorts/` | 视频 (Video) |
|
|
163
|
+
| TikTok | `tiktok.com/@/video/`, `vm.tiktok.com`, `vt.tiktok.com` | 短视频 (Short video) |
|
|
164
|
+
| AcFun(A站) | `acfun.cn/v/ac` | 视频 (Video) |
|
|
165
|
+
| 知乎 Zhihu | `zhihu.com/video/`, `zhihu.com/question/xxx/answer/xxx`, `zhuanlan.zhihu.com/p/`, `zhihu.com/zvideo/` | 视频、回答中的视频 (Video, answer video) |
|
|
166
|
+
| 微视 Weishi | `weishi.qq.com/weishi/feed/` | 短视频 (Short video) |
|
|
167
|
+
| 虎牙 Huya | `huya.com/video/` | 直播回放、视频 (Live replay, Video) |
|
|
168
|
+
| 好看视频 Haokan | `haokan.baidu.com/v?vid=` | 短视频 (Short video) |
|
|
169
|
+
| 美拍 Meipai | `meipai.com/media/` | 短视频 (Short video) |
|
|
170
|
+
| Twitter / X | `twitter.com/用户名/status/`, `x.com/用户名/status/` | 视频、图文 (Video, Image) |
|
|
171
|
+
| Instagram | `instagram.com/p/`, `instagram.com/reel/`, `instagram.com/share/` | 图文、Reels (Image, Reels) |
|
|
172
|
+
| 豆包(视频)Doubao Video | `doubao.com/video/`, `doubao.com/video-sharing` | 视频 (Video) |
|
|
173
|
+
| 豆包(图集)Doubao Image | `doubao.com/thread/` | 图文 (Image) |
|
|
174
|
+
| **即梦 (Jimeng)** | `jimeng.jianying.com`, `jimeng.cn`, `dreamina.jianying.com`, `dreamina.capcut.com` | AI视频、AI图片 (AI video, AI image) |
|
|
175
|
+
| 绿洲 Oasis | `oasis.weibo.com/v/` | 视频、图文 (Video, Image) |
|
|
176
|
+
| 视频号 WeChat Channels | `channels.weixin.qq.com`, `weixin.qq.com/sph/` | 短视频 (Short video) |
|
|
177
|
+
| 梨视频 Lishi | `pearvideo.com/video_`, `video.li` | 短视频 (Short video) |
|
|
178
|
+
| 全民直播 Quanmin | `quanmin.tv`, `quanmintv.cn` | 直播 (Live) |
|
|
179
|
+
| 皮皮搞笑 Pipigx | `h5.pipigx.com/pp/post/`, `ippzone.com` | 短视频 (Short video) |
|
|
180
|
+
| 皮皮虾 Pipixia | `pipix.com`, `pipixia.com` | 短视频 (Short video) |
|
|
181
|
+
| 最右 Zuiyou | `share.xiaochuankeji.cn/hybrid/share/post`, `izuiyou.com` | 短视频 (Short video) |
|
|
182
|
+
| 自定义平台 Custom | 通过 `customPlatforms` 配置添加 (Add via `customPlatforms`) | 取决于提供的 API (Depends on API) |
|
|
178
183
|
|
|
179
184
|
## 项目贡献者 (Contributors)
|
|
180
185
|
|
|
181
186
|
| 贡献者 (Contributor) | 贡献内容 (Contribution) |
|
|
182
187
|
|----------------------|-------------------------|
|
|
183
188
|
| Minecraft-1314 | 插件完整开发 (Complete plugin development) |
|
|
184
|
-
| ShiraiKuroko003 | 修复消息格式设置问题并且PR-1.2.5版本已修复 |
|
|
185
|
-
| cyavb | 提交功能建议-给自定义API添加KEY认证-已修复 |
|
|
186
|
-
| Keep785 | 提交Bug-无法正常关闭发送封面-已修复<br>提交Bug-解析问题-已修复 |
|
|
187
|
-
| dzt2008 + Apricityx | 提交Bug-会对非支持视频平台URL进行误解析-已修复 |
|
|
188
|
-
| JH-Ahua | BugPk-Api 支持 |
|
|
189
|
-
| shangxue | 灵感来源 |
|
|
189
|
+
| ShiraiKuroko003 | 修复消息格式设置问题并且PR-1.2.5版本已修复 (Fixed message format issue, PR-1.2.5) |
|
|
190
|
+
| cyavb | 提交功能建议-给自定义API添加KEY认证-已修复 (Suggested custom API key auth - fixed) |
|
|
191
|
+
| Keep785 | 提交Bug-无法正常关闭发送封面-已修复<br>提交Bug-解析问题-已修复 (Reported bugs - cannot disable cover sending and parsing issues - fixed) |
|
|
192
|
+
| dzt2008 + Apricityx | 提交Bug-会对非支持视频平台URL进行误解析-已修复 (Reported incorrect parsing of unsupported URLs - fixed) |
|
|
190
193
|
| linyves | 提交Bug-小红书图集重复发送封面-已修复<br>提交Bug-话题显示异常 #**[话题]#-已修复<br>提交建议-Live Photo 全部按普通图片处理-已采纳<br>提交Bug-解析后会把作者头像一起发送-已修复 |
|
|
194
|
+
| JH-Ahua | BugPk-Api 支持 (BugPk-Api support) |
|
|
195
|
+
| shangxue | 灵感来源 (Inspiration) |
|
|
191
196
|
|
|
192
|
-
(欢迎通过 Issues 或 PR 加入贡献者列表)
|
|
197
|
+
(欢迎通过 Issues 或 PR 加入贡献者列表)
|
|
198
|
+
(Welcome to join the contributor list via Issues or PR)
|
|
193
199
|
|
|
194
200
|
## 许可协议 (License)
|
|
195
201
|
|
|
196
|
-
本项目采用 MIT 许可证,详情参见 [LICENSE](LICENSE) 文件。
|
|
197
|
-
|
|
202
|
+
本项目采用 MIT 许可证,详情参见 [LICENSE](LICENSE) 文件。
|
|
198
203
|
This project is licensed under the MIT License, see the [LICENSE](LICENSE) file for details.
|
|
199
204
|
|
|
200
205
|
## 支持我们 (Support Us)
|
|
201
206
|
|
|
202
|
-
如果这个项目对您有帮助,欢迎点亮右上角的 Star ⭐ 支持我们!
|
|
203
|
-
|
|
207
|
+
如果这个项目对您有帮助,欢迎点亮右上角的 Star ⭐ 支持我们!
|
|
204
208
|
If this project is helpful to you, please feel free to star it in the upper right corner ⭐ to support us!
|