koishi-plugin-video-parser-all 1.2.6 → 1.2.7
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 +44 -32
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -82,35 +82,47 @@ exports.Config = koishi_1.Schema.intersect([
|
|
|
82
82
|
primaryApiUrl: koishi_1.Schema.string().default('https://api.bugpk.com/api/short_videos').description('主 API 地址'),
|
|
83
83
|
backupApiUrl: koishi_1.Schema.string().default('https://api.bugpk.com/api/svparse').description('备用主 API 地址'),
|
|
84
84
|
platformDedicatedFirst: koishi_1.Schema.object({
|
|
85
|
-
bilibili: koishi_1.Schema.boolean().default(false),
|
|
86
|
-
douyin: koishi_1.Schema.boolean().default(false),
|
|
87
|
-
kuaishou: koishi_1.Schema.boolean().default(false),
|
|
88
|
-
xiaohongshu: koishi_1.Schema.boolean().default(false),
|
|
89
|
-
weibo: koishi_1.Schema.boolean().default(false),
|
|
90
|
-
xigua: koishi_1.Schema.boolean().default(false),
|
|
91
|
-
youtube: koishi_1.Schema.boolean().default(false),
|
|
92
|
-
tiktok: koishi_1.Schema.boolean().default(false),
|
|
93
|
-
acfun: koishi_1.Schema.boolean().default(false),
|
|
94
|
-
zhihu: koishi_1.Schema.boolean().default(false),
|
|
95
|
-
weishi: koishi_1.Schema.boolean().default(false),
|
|
96
|
-
huya: koishi_1.Schema.boolean().default(false),
|
|
97
|
-
haokan: koishi_1.Schema.boolean().default(false),
|
|
98
|
-
meipai: koishi_1.Schema.boolean().default(false),
|
|
99
|
-
twitter: koishi_1.Schema.boolean().default(false),
|
|
100
|
-
instagram: koishi_1.Schema.boolean().default(false),
|
|
101
|
-
doubao: koishi_1.Schema.boolean().default(false),
|
|
102
|
-
oasis: koishi_1.Schema.boolean().default(false),
|
|
103
|
-
wechat_channel: koishi_1.Schema.boolean().default(false),
|
|
85
|
+
bilibili: koishi_1.Schema.boolean().default(false).description('哔哩哔哩 - 优先使用专属 API'),
|
|
86
|
+
douyin: koishi_1.Schema.boolean().default(false).description('抖音 - 优先使用专属 API'),
|
|
87
|
+
kuaishou: koishi_1.Schema.boolean().default(false).description('快手 - 优先使用专属 API'),
|
|
88
|
+
xiaohongshu: koishi_1.Schema.boolean().default(false).description('小红书 - 优先使用专属 API'),
|
|
89
|
+
weibo: koishi_1.Schema.boolean().default(false).description('微博 - 优先使用专属 API'),
|
|
90
|
+
xigua: koishi_1.Schema.boolean().default(false).description('西瓜视频 - 优先使用专属 API'),
|
|
91
|
+
youtube: koishi_1.Schema.boolean().default(false).description('YouTube - 优先使用专属 API'),
|
|
92
|
+
tiktok: koishi_1.Schema.boolean().default(false).description('TikTok - 优先使用专属 API'),
|
|
93
|
+
acfun: koishi_1.Schema.boolean().default(false).description('AcFun - 优先使用专属 API'),
|
|
94
|
+
zhihu: koishi_1.Schema.boolean().default(false).description('知乎 - 优先使用专属 API'),
|
|
95
|
+
weishi: koishi_1.Schema.boolean().default(false).description('微视 - 优先使用专属 API'),
|
|
96
|
+
huya: koishi_1.Schema.boolean().default(false).description('虎牙 - 优先使用专属 API'),
|
|
97
|
+
haokan: koishi_1.Schema.boolean().default(false).description('好看视频 - 优先使用专属 API'),
|
|
98
|
+
meipai: koishi_1.Schema.boolean().default(false).description('美拍 - 优先使用专属 API'),
|
|
99
|
+
twitter: koishi_1.Schema.boolean().default(false).description('Twitter/X - 优先使用专属 API'),
|
|
100
|
+
instagram: koishi_1.Schema.boolean().default(false).description('Instagram - 优先使用专属 API'),
|
|
101
|
+
doubao: koishi_1.Schema.boolean().default(false).description('豆包 - 优先使用专属 API'),
|
|
102
|
+
oasis: koishi_1.Schema.boolean().default(false).description('绿洲 - 优先使用专属 API'),
|
|
103
|
+
wechat_channel: koishi_1.Schema.boolean().default(false).description('视频号 - 优先使用专属 API'),
|
|
104
104
|
}).description('各平台独立开关:是否优先使用专属 API'),
|
|
105
105
|
customApis: koishi_1.Schema.array(koishi_1.Schema.object({
|
|
106
106
|
platform: koishi_1.Schema.union([
|
|
107
|
-
koishi_1.Schema.const('bilibili')
|
|
108
|
-
koishi_1.Schema.const('
|
|
109
|
-
koishi_1.Schema.const('
|
|
110
|
-
koishi_1.Schema.const('
|
|
111
|
-
koishi_1.Schema.const('
|
|
112
|
-
koishi_1.Schema.const('
|
|
113
|
-
koishi_1.Schema.const('
|
|
107
|
+
koishi_1.Schema.const('bilibili').description('哔哩哔哩'),
|
|
108
|
+
koishi_1.Schema.const('douyin').description('抖音'),
|
|
109
|
+
koishi_1.Schema.const('kuaishou').description('快手'),
|
|
110
|
+
koishi_1.Schema.const('xiaohongshu').description('小红书'),
|
|
111
|
+
koishi_1.Schema.const('weibo').description('微博'),
|
|
112
|
+
koishi_1.Schema.const('xigua').description('西瓜视频'),
|
|
113
|
+
koishi_1.Schema.const('youtube').description('YouTube'),
|
|
114
|
+
koishi_1.Schema.const('tiktok').description('TikTok'),
|
|
115
|
+
koishi_1.Schema.const('acfun').description('AcFun'),
|
|
116
|
+
koishi_1.Schema.const('zhihu').description('知乎'),
|
|
117
|
+
koishi_1.Schema.const('weishi').description('微视'),
|
|
118
|
+
koishi_1.Schema.const('huya').description('虎牙'),
|
|
119
|
+
koishi_1.Schema.const('haokan').description('好看视频'),
|
|
120
|
+
koishi_1.Schema.const('meipai').description('美拍'),
|
|
121
|
+
koishi_1.Schema.const('twitter').description('Twitter/X'),
|
|
122
|
+
koishi_1.Schema.const('instagram').description('Instagram'),
|
|
123
|
+
koishi_1.Schema.const('doubao').description('豆包'),
|
|
124
|
+
koishi_1.Schema.const('oasis').description('绿洲'),
|
|
125
|
+
koishi_1.Schema.const('wechat_channel').description('视频号'),
|
|
114
126
|
]).description('选择平台'),
|
|
115
127
|
apiUrl: koishi_1.Schema.string().description('API 地址'),
|
|
116
128
|
apiKey: koishi_1.Schema.string().description('API Key(可选)').default(''),
|
|
@@ -120,14 +132,14 @@ exports.Config = koishi_1.Schema.intersect([
|
|
|
120
132
|
koishi_1.Schema.const('Custom').description('自定义 Header 名称'),
|
|
121
133
|
]).default('Bearer').description('认证头类型'),
|
|
122
134
|
customHeaderName: koishi_1.Schema.string().description('自定义 Header 名称(仅当选择 Custom 时有效)').default('X-API-Key'),
|
|
123
|
-
})).default([]).description('自定义平台专属 API
|
|
135
|
+
})).default([]).description('自定义平台专属 API 地址,留空则使用内置默认专属 API'),
|
|
124
136
|
}).description('API 选择设置'),
|
|
125
137
|
koishi_1.Schema.object({
|
|
126
|
-
waitingTipText: koishi_1.Schema.string().default('正在解析视频,请稍候...'),
|
|
127
|
-
unsupportedPlatformText: koishi_1.Schema.string().default('不支持该平台链接'),
|
|
128
|
-
invalidLinkText: koishi_1.Schema.string().default('无效的视频链接'),
|
|
129
|
-
parseErrorPrefix: koishi_1.Schema.string().default('❌ 解析失败:'),
|
|
130
|
-
parseErrorItemFormat: koishi_1.Schema.string().default('【${url}】: ${msg}'),
|
|
138
|
+
waitingTipText: koishi_1.Schema.string().default('正在解析视频,请稍候...').description('解析等待提示文字'),
|
|
139
|
+
unsupportedPlatformText: koishi_1.Schema.string().default('不支持该平台链接').description('不支持的平台提示文字'),
|
|
140
|
+
invalidLinkText: koishi_1.Schema.string().default('无效的视频链接').description('无效链接提示(parse 指令)'),
|
|
141
|
+
parseErrorPrefix: koishi_1.Schema.string().default('❌ 解析失败:').description('解析失败消息前缀'),
|
|
142
|
+
parseErrorItemFormat: koishi_1.Schema.string().default('【${url}】: ${msg}').description('每条解析失败的展示格式,可用 ${url}(链接)和 ${msg}(错误信息)'),
|
|
131
143
|
}).description('界面文字设置'),
|
|
132
144
|
]);
|
|
133
145
|
const logger = new koishi_1.Logger(exports.name);
|
package/package.json
CHANGED