koishi-plugin-video-parser-all 1.4.4 → 1.4.6

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.d.ts CHANGED
@@ -4,6 +4,7 @@ declare module 'koishi' {
4
4
  downloads?: {
5
5
  download(url: string, dest: string, options?: Record<string, unknown>): Promise<string>;
6
6
  };
7
+ aria2?: any;
7
8
  }
8
9
  }
9
10
  export declare const name = "video-parser-all";
@@ -60,10 +61,6 @@ export declare const Config: Schema<{
60
61
  mediaDownloadTimeout?: number | null | undefined;
61
62
  maxMediaSize?: number | null | undefined;
62
63
  downloadEngine?: "internal" | "aria2" | "downloads" | null | undefined;
63
- aria2Host?: string | null | undefined;
64
- aria2Port?: number | null | undefined;
65
- aria2Secret?: string | null | undefined;
66
- resumeDownload?: boolean | null | undefined;
67
64
  } & {
68
65
  timeout?: number | null | undefined;
69
66
  videoSendTimeout?: number | null | undefined;
@@ -209,10 +206,6 @@ export declare const Config: Schema<{
209
206
  mediaDownloadTimeout: number;
210
207
  maxMediaSize: number;
211
208
  downloadEngine: "internal" | "aria2" | "downloads";
212
- aria2Host: string;
213
- aria2Port: number;
214
- aria2Secret: string;
215
- resumeDownload: boolean;
216
209
  } & {
217
210
  timeout: number;
218
211
  videoSendTimeout: number;
package/lib/index.js CHANGED
@@ -127,13 +127,9 @@ exports.Config = koishi_1.Schema.intersect([
127
127
  maxMediaSize: koishi_1.Schema.number().min(0).step(1).default(0).description('最大下载文件大小 (MB),0 为不限制'),
128
128
  downloadEngine: koishi_1.Schema.union([
129
129
  koishi_1.Schema.const('internal').description('内置下载'),
130
- koishi_1.Schema.const('aria2').description('aria2 下载'),
130
+ koishi_1.Schema.const('aria2').description('aria2 下载(需 koishi-plugin-aria2-plus)'),
131
131
  koishi_1.Schema.const('downloads').description('downloads 服务下载'),
132
132
  ]).default('internal').description('下载引擎'),
133
- aria2Host: koishi_1.Schema.string().default('127.0.0.1').description('aria2 RPC 地址'),
134
- aria2Port: koishi_1.Schema.number().default(6800).description('aria2 RPC 端口'),
135
- aria2Secret: koishi_1.Schema.string().default('').description('aria2 RPC 密钥'),
136
- resumeDownload: koishi_1.Schema.boolean().default(true).description('启用断点续传(仅 aria2 模式)'),
137
133
  }).description('性能与限制'),
138
134
  koishi_1.Schema.object({
139
135
  timeout: koishi_1.Schema.number().min(0).step(1).default(180000).description('API 请求超时 (ms)'),
@@ -298,46 +294,64 @@ function debugLog(level, ...args) {
298
294
  }
299
295
  const BUILTIN_LINK_RULES = [
300
296
  { pattern: /https?:\/\/(?:www\.)?bilibili\.com\/video\/([ab]v[0-9a-zA-Z_-]+)[^\s]*/gi, type: 'bilibili' },
301
- { pattern: /https?:\/\/b23\.tv\/[0-9a-zA-Z_-]{5,}[^\s]*/gi, type: 'bilibili' },
302
- { pattern: /https?:\/\/bili\d+\.cn\/[0-9a-zA-Z_-]{5,}[^\s]*/gi, type: 'bilibili' },
297
+ { pattern: /https?:\/\/b23\.tv\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'bilibili' },
298
+ { pattern: /https?:\/\/bili\d+\.cn\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'bilibili' },
299
+ { pattern: /https?:\/\/b23\.wtf\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'bilibili' },
300
+ { pattern: /https?:\/\/bili2233\.cn\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'bilibili' },
303
301
  { pattern: /https?:\/\/(?:www\.)?douyin\.com\/video\/\d{10,}[^\s]*/gi, type: 'douyin' },
304
- { pattern: /https?:\/\/v\.douyin\.com\/[0-9a-zA-Z_-]{8,}[^\s]*/gi, type: 'douyin' },
305
- { pattern: /https?:\/\/(?:www\.)?kuaishou\.com\/short-video\/[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'kuaishou' },
306
- { pattern: /https?:\/\/v\.kuaishou\.com\/[0-9a-zA-Z_-]{8,}[^\s]*/gi, type: 'kuaishou' },
307
- { pattern: /https?:\/\/(?:www\.)?xiaohongshu\.com\/discovery\/item\/[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'xiaohongshu' },
308
- { pattern: /https?:\/\/xhslink\.com\/[0-9a-zA-Z_-]{8,}[^\s]*/gi, type: 'xiaohongshu' },
309
- { pattern: /https?:\/\/weibo\.com\/\d+\/[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'weibo' },
310
- { pattern: /https?:\/\/video\.weibo\.com\/show\?fid=[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'weibo' },
302
+ { pattern: /https?:\/\/v\.douyin\.com\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'douyin' },
303
+ { pattern: /https?:\/\/(?:www\.)?kuaishou\.com\/short-video\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'kuaishou' },
304
+ { pattern: /https?:\/\/v\.kuaishou\.com\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'kuaishou' },
305
+ { pattern: /https?:\/\/(?:www\.)?kuaishou\.com\/f\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'kuaishou' },
306
+ { pattern: /https?:\/\/(?:www\.)?xiaohongshu\.com\/discovery\/item\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'xiaohongshu' },
307
+ { pattern: /https?:\/\/xhslink\.com\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'xiaohongshu' },
308
+ { pattern: /https?:\/\/(?:www\.)?xiaohongshu\.com\/explore\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'xiaohongshu' },
309
+ { pattern: /https?:\/\/(?:www\.)?xiaohongshu\.com\/board\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'xiaohongshu' },
310
+ { pattern: /https?:\/\/weibo\.com\/\d+\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'weibo' },
311
+ { pattern: /https?:\/\/video\.weibo\.com\/show\?fid=[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'weibo' },
312
+ { pattern: /https?:\/\/t\.cn\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'weibo' },
313
+ { pattern: /https?:\/\/m\.weibo\.cn\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'weibo' },
311
314
  { pattern: /https?:\/\/(?:www\.)?ixigua\.com\/\d{10,}[^\s]*/gi, type: 'xigua' },
312
315
  { pattern: /https?:\/\/(?:www\.)?youtube\.com\/watch\?v=[a-zA-Z0-9_-]{11}[^\s]*/gi, type: 'youtube' },
313
- { pattern: /https?:\/\/youtu\.be\/[a-zA-Z0-9_-]{11}[^\s]*/gi, type: 'youtube' },
316
+ { pattern: /https?:\/\/youtu\.be\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'youtube' },
317
+ { pattern: /https?:\/\/(?:www\.)?youtube\.com\/shorts\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'youtube' },
314
318
  { pattern: /https?:\/\/(?:www\.)?tiktok\.com\/@[\w.]+\/video\/\d{10,}[^\s]*/gi, type: 'tiktok' },
315
- { pattern: /https?:\/\/vm\.tiktok\.com\/[0-9a-zA-Z_-]{8,}[^\s]*/gi, type: 'tiktok' },
319
+ { pattern: /https?:\/\/vm\.tiktok\.com\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'tiktok' },
320
+ { pattern: /https?:\/\/vt\.tiktok\.com\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'tiktok' },
316
321
  { pattern: /https?:\/\/(?:www\.)?acfun\.cn\/v\/ac\d{10,}[^\s]*/gi, type: 'acfun' },
317
322
  { pattern: /https?:\/\/(?:www\.)?zhihu\.com\/video\/\d{10,}[^\s]*/gi, type: 'zhihu' },
318
- { pattern: /https?:\/\/weishi\.qq\.com\/weishi\/feed\/[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'weishi' },
319
- { pattern: /https?:\/\/(?:www\.)?huya\.com\/video\/[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'huya' },
320
- { pattern: /https?:\/\/haokan\.baidu\.com\/v\?vid=[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'haokan' },
323
+ { pattern: /https?:\/\/(?:www\.|m\.)?zhihu\.com\/question\/\d+\/answer\/\d+[^\s]*/gi, type: 'zhihu' },
324
+ { pattern: /https?:\/\/zhuanlan\.zhihu\.com\/p\/\d+[^\s]*/gi, type: 'zhihu' },
325
+ { pattern: /https?:\/\/(?:www\.|m\.)?zhihu\.com\/zvideo\/\d+[^\s]*/gi, type: 'zhihu' },
326
+ { pattern: /https?:\/\/weishi\.qq\.com\/weishi\/feed\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'weishi' },
327
+ { pattern: /https?:\/\/(?:www\.)?huya\.com\/video\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'huya' },
328
+ { pattern: /https?:\/\/haokan\.baidu\.com\/v\?vid=[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'haokan' },
321
329
  { pattern: /https?:\/\/(?:www\.)?meipai\.com\/media\/\d{10,}[^\s]*/gi, type: 'meipai' },
322
330
  { pattern: /https?:\/\/twitter\.com\/\w+\/status\/\d{10,}[^\s]*/gi, type: 'twitter' },
323
331
  { pattern: /https?:\/\/x\.com\/\w+\/status\/\d{10,}[^\s]*/gi, type: 'twitter' },
324
- { pattern: /https?:\/\/(?:www\.)?instagram\.com\/p\/[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'instagram' },
332
+ { pattern: /https?:\/\/(?:www\.)?instagram\.com\/p\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'instagram' },
333
+ { pattern: /https?:\/\/(?:www\.)?instagram\.com\/reel\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'instagram' },
334
+ { pattern: /https?:\/\/(?:www\.)?instagram\.com\/share\/(?:reel|p)\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'instagram' },
325
335
  { pattern: /https?:\/\/(?:www\.)?doubao\.com\/video\/\d{10,}[^\s]*/gi, type: 'doubao' },
326
336
  { pattern: /https?:\/\/(?:www\.)?doubao\.com\/video-sharing\?[^\s]*/gi, type: 'doubao' },
327
337
  { pattern: /https?:\/\/(?:www\.)?doubao\.com\/thread\/[^\s]+/gi, type: 'doubao_image' },
328
- { pattern: /https?:\/\/(?:www\.)?oasis\.weibo\.com\/v\/[0-9a-zA-Z_-]+[^\s]*/gi, type: 'oasis' },
329
- { pattern: /https?:\/\/channels\.weixin\.qq\.com\/[0-9a-zA-Z_-]+[^\s]*/gi, type: 'wechat_channel' },
330
- { pattern: /https?:\/\/weixin\.qq\.com\/sph\/[0-9a-zA-Z_-]+[^\s]*/gi, type: 'wechat_channel' },
338
+ { pattern: /https?:\/\/(?:www\.)?jimeng\.jianying\.com\/[^\s]*/gi, type: 'jimeng' },
339
+ { pattern: /https?:\/\/(?:www\.)?jimeng\.cn\/[^\s]*/gi, type: 'jimeng' },
340
+ { pattern: /https?:\/\/(?:www\.)?dreamina\.jianying\.com\/[^\s]*/gi, type: 'jimeng' },
341
+ { pattern: /https?:\/\/(?:www\.)?dreamina\.capcut\.com\/[^\s]*/gi, type: 'jimeng' },
342
+ { pattern: /https?:\/\/(?:www\.)?oasis\.weibo\.com\/v\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'oasis' },
343
+ { pattern: /https?:\/\/channels\.weixin\.qq\.com\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'wechat_channel' },
344
+ { pattern: /https?:\/\/weixin\.qq\.com\/sph\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'wechat_channel' },
331
345
  { pattern: /https?:\/\/(?:www\.)?pearvideo\.com\/video_\d+[^\s]*/gi, type: 'lishi' },
332
- { pattern: /https?:\/\/video\.li\/[0-9a-zA-Z_-]{3,}[^\s]*/gi, type: 'lishi' },
333
- { pattern: /https?:\/\/(?:www\.)?quanmin\.tv\/\w+[^\s]*/gi, type: 'quanmin' },
334
- { pattern: /https?:\/\/(?:www\.)?quanmintv\.cn\/\w+[^\s]*/gi, type: 'quanmin' },
346
+ { pattern: /https?:\/\/video\.li\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'lishi' },
347
+ { pattern: /https?:\/\/(?:www\.)?quanmin\.tv\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'quanmin' },
348
+ { pattern: /https?:\/\/(?:www\.)?quanmintv\.cn\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'quanmin' },
335
349
  { pattern: /https?:\/\/h5\.pipigx\.com\/pp\/post\/\d+[^\s]*/gi, type: 'pipigx' },
336
- { pattern: /https?:\/\/(?:www\.)?ippzone\.com\/\w+[^\s]*/gi, type: 'pipigx' },
337
- { pattern: /https?:\/\/(?:h5|www)\.pipix\.com\/\w+[^\s]*/gi, type: 'pipixia' },
338
- { pattern: /https?:\/\/(?:www\.)?pipixia\.com\/\w+[^\s]*/gi, type: 'pipixia' },
350
+ { pattern: /https?:\/\/(?:www\.)?ippzone\.com\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'pipigx' },
351
+ { pattern: /https?:\/\/(?:h5|www)\.pipix\.com\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'pipixia' },
352
+ { pattern: /https?:\/\/(?:www\.)?pipixia\.com\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'pipixia' },
339
353
  { pattern: /https?:\/\/share\.xiaochuankeji\.cn\/hybrid\/share\/post\?pid=\d+[^\s]*/gi, type: 'zuiyou' },
340
- { pattern: /https?:\/\/(?:h5|www)\.izuiyou\.com\/\w+[^\s]*/gi, type: 'zuiyou' },
354
+ { pattern: /https?:\/\/(?:h5|www)\.izuiyou\.com\/[0-9a-zA-Z_\/-]+[^\s]*/gi, type: 'zuiyou' },
341
355
  ];
342
356
  function buildCustomLinkRules(customPlatforms) {
343
357
  if (!Array.isArray(customPlatforms) || customPlatforms.length === 0)
@@ -722,23 +736,8 @@ function apply(ctx, config) {
722
736
  const mediaDownloadTimeout = config.mediaDownloadTimeout ?? 120000;
723
737
  const maxMediaSize = config.maxMediaSize ?? 0;
724
738
  const downloadEngine = config.downloadEngine || 'internal';
725
- let aria2 = null;
726
- if (downloadEngine === 'aria2') {
727
- try {
728
- const Aria2 = require('aria2');
729
- aria2 = new Aria2({
730
- host: config.aria2Host || '127.0.0.1',
731
- port: config.aria2Port || 6800,
732
- secure: false,
733
- secret: config.aria2Secret || '',
734
- path: '/jsonrpc'
735
- });
736
- aria2.open();
737
- logger.info('aria2 连接成功');
738
- }
739
- catch (e) {
740
- logger.warn('aria2 连接失败,回退到内置下载');
741
- }
739
+ if (downloadEngine === 'aria2' && !ctx.aria2) {
740
+ logger.warn('选择了 aria2 下载引擎,但未检测到 koishi-plugin-aria2-plus 服务,将回退到内置下载');
742
741
  }
743
742
  function getPlatformConfig(type) {
744
743
  if (type.startsWith('custom_')) {
@@ -834,9 +833,9 @@ function apply(ctx, config) {
834
833
  debugLog('ERROR', `downloads 服务下载失败,回退内置下载: ${getErrorMessage(e)}`);
835
834
  }
836
835
  }
837
- else if (downloadEngine === 'aria2' && aria2 && config.resumeDownload) {
836
+ else if (downloadEngine === 'aria2' && ctx.aria2) {
838
837
  try {
839
- const gid = await aria2.call('aria2.addUri', [url], {
838
+ const gid = await ctx.aria2.addUri([url], {
840
839
  dir: cacheDir,
841
840
  out: fileName,
842
841
  split: 4,
@@ -852,10 +851,10 @@ function apply(ctx, config) {
852
851
  const ariaStartTime = Date.now();
853
852
  while (!completed) {
854
853
  if (Date.now() - ariaStartTime > timeout) {
855
- await aria2.call('aria2.remove', gid).catch(() => { });
854
+ await ctx.aria2.remove(gid).catch(() => { });
856
855
  throw new Error('aria2下载超时');
857
856
  }
858
- const status = await aria2.call('aria2.tellStatus', gid);
857
+ const status = await ctx.aria2.tellStatus(gid);
859
858
  if (status.status === 'complete') {
860
859
  completed = true;
861
860
  }
@@ -1321,8 +1320,6 @@ function apply(ctx, config) {
1321
1320
  }, 3600000);
1322
1321
  ctx.on('dispose', () => {
1323
1322
  clearInterval(tempCleanupInterval);
1324
- if (aria2)
1325
- aria2.close();
1326
1323
  urlCacheLocal.clear();
1327
1324
  dedupCache.clear();
1328
1325
  debugLog('INFO', '插件已卸载');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-video-parser-all",
3
3
  "description": "Koishi 全平台视频/图集解析插件,支持抖音/快手/B站/微博/小红书/剪映/YouTube/TikTok等20+平台",
4
- "version": "1.4.4",
4
+ "version": "1.4.6",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -101,7 +101,7 @@
101
101
  "koishi-plugin-downloads": "^1.0.0",
102
102
  "koishi-plugin-silk": "^1.0.0",
103
103
  "koishi-plugin-ffmpeg": "^1.0.0",
104
- "aria2": "^4.1.2"
104
+ "koishi-plugin-aria2-plus": "^1.0.0"
105
105
  },
106
106
  "peerDependenciesMeta": {
107
107
  "koishi-plugin-downloads": {
@@ -113,7 +113,7 @@
113
113
  "koishi-plugin-ffmpeg": {
114
114
  "optional": true
115
115
  },
116
- "aria2": {
116
+ "koishi-plugin-aria2-plus": {
117
117
  "optional": true
118
118
  }
119
119
  },
package/readme.md CHANGED
@@ -3,10 +3,10 @@
3
3
  ## 项目介绍 (Project Introduction)
4
4
 
5
5
  ### 中文
6
- 这是一个为 Koishi 机器人框架开发的**全平台视频/图集解析插件**,使用统一API接口,支持自动识别并解析抖音、快手、B站、小红书、微博、YouTube、TikTok、剪映、AcFun、知乎、虎牙、绿洲、视频号等20+主流平台的短视频/图集/实况链接。
6
+ 这是一个为 Koishi 机器人框架开发的**全平台视频/图集解析插件**,使用统一API接口,支持自动识别并解析抖音、快手、B站、小红书、微博、西瓜视频、YouTube、TikTokAcFun(A站)、知乎、微视、虎牙、好看视频、美拍、Twitter/X、Instagram、豆包(视频/图集)、**即梦(AI视频/图片)**、绿洲、视频号、梨视频、全民直播、皮皮搞笑、皮皮虾、最右等**20+主流平台**的短视频/图集/实况链接。
7
7
 
8
8
  ### English
9
- 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, Oasis, WeChat Channels and more.
9
+ 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, Xigua, YouTube, TikTok, AcFun, Zhihu, Weishi, Huya, Haokan, Meipai, Twitter/X, Instagram, Doubao (video/images), **Jimeng (AI video/image)**, Oasis, WeChat Channels, Lishi, Quanmin, Pipigx, Pipixia, Zuiyou and more.
10
10
 
11
11
  ## 项目仓库 (Repository)
12
12
  - GitHub: `https://github.com/Minecraft-1314/koishi-plugin-video-parser-all`
@@ -61,10 +61,6 @@ This is a **multi-platform video/image parsing plugin** developed for the Koishi
61
61
  | `mediaDownloadTimeout` | number | 120000 | 统一下载超时 (ms) |
62
62
  | `maxMediaSize` | number | 0 | 最大下载文件大小 (MB),0 为不限制 |
63
63
  | `downloadEngine` | string | internal | 下载引擎(internal / aria2 / downloads) |
64
- | `aria2Host` | string | 127.0.0.1 | aria2 RPC 地址 |
65
- | `aria2Port` | number | 6800 | aria2 RPC 端口 |
66
- | `aria2Secret` | string | | aria2 RPC 密钥 |
67
- | `resumeDownload` | boolean | true | 启用断点续传(仅 aria2) |
68
64
 
69
65
  ### 网络与请求
70
66
  | 配置项 | 类型 | 默认值 | 说明 |
@@ -134,43 +130,43 @@ This is a **multi-platform video/image parsing plugin** developed for the Koishi
134
130
  - `koishi-plugin-silk`:silk 编解码
135
131
  - `koishi-plugin-ffmpeg`:音频重采样
136
132
  ### aria2 下载引擎(可选)
137
- 若启用 `downloadEngine: 'aria2'`,请安装并启动 aria2 服务,并安装 npm 包 `aria2`:
138
- - 安装 aria2 服务端:https://github.com/aria2/aria2
139
- - 安装 npm 客户端:`npm install aria2`
140
- - 启动 RPC:`aria2c --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all`
141
- 未满足条件时自动降级为内置下载,不影响正常使用。
133
+ 若启用 `downloadEngine: 'aria2'`,请安装可选依赖 `koishi-plugin-aria2-plus` 并配置该插件连接 aria2 服务。插件启动时会自动检测该服务,未安装或不可用时将降级为内置下载,不影响正常使用。
142
134
  ### downloads 服务(可选)
143
135
  若启用 `downloadEngine: 'downloads'`,请安装可选依赖 `koishi-plugin-downloads`,失败时回退到内置下载。
144
136
 
145
137
  ## 支持的平台 (Supported Platforms)
146
- | 平台名称 | 关键词识别 | 解析能力 |
147
- |----------|------------|----------|
148
- | 哔哩哔哩 (B站) | bilibili, b23.tv, bilibili.com | 视频 |
149
- | 抖音 | douyin, v.douyin.com | 短视频、图集、实况 |
150
- | 快手 | kuaishou, v.kuaishou.com | 短视频、图集 |
151
- | 小红书 | xiaohongshu, xhslink.com | 图文、视频 |
152
- | 微博 | weibo, video.weibo.com | 视频、图集 |
153
- | 剪映 / 即梦 | jianying, jimeng.jianying.com | 视频模板 |
154
- | 今日头条 / 西瓜视频 | toutiao, ixigua.com | 短视频 |
155
- | AcFun(A站) | acfun, acfun.cn | 视频 |
156
- | 知乎 | zhihu, zhihu.com | 视频、回答 |
157
- | 微视 | weishi, weishi.qq.com | 短视频 |
158
- | 虎牙 | huya, huya.com | 直播、视频 |
159
- | YouTube(油管) | youtube, youtu.be | 视频 |
160
- | TikTok(国际版抖音) | tiktok, tiktok.com | 短视频 |
161
- | 好看视频 | haokan, haokan.baidu.com | 短视频 |
162
- | 美拍 | meipai, meipai.com | 短视频 |
163
- | Twitter / X | twitter, x.com | 视频、图文 |
164
- | Instagram | instagram, instagram.com | 图文、Reels |
165
- | 豆包 | doubao (doubao.com/video) | 视频 |
166
- | 皮皮搞笑 | pipigx, h5.pipigx.com | 短视频 |
167
- | 皮皮虾 | pipixia, h5.pipix.com | 短视频 |
168
- | 最右 | zuiyou, xiaochuankeji.cn | 短视频 |
169
- | 梨视频 | video.li, pearvideo.com | 短视频 |
170
- | 全民直播 | quanmin (quanmin.tv) | 直播 |
171
- | 绿洲 (Oasis) | oasis.weibo.com | 视频、图文 |
172
- | 视频号 (WeChat Channels) | channels.weixin.qq.com, weixin.qq.com/sph/ | 短视频 |
173
- | 🔧 自定义平台 | 通过 `customPlatforms` 添加 | 取决于 API |
138
+
139
+ > 以下为插件内置链接匹配规则,可根据用户发送的链接自动识别。所有匹配规则同时支持 HTTP 和 HTTPS 协议,并兼容多级路径(如短链后带 `/` 子路径)。
140
+
141
+ | 平台名称 | 关键词识别(匹配的域名/路径模式) | 解析能力 |
142
+ |----------|----------------------------------|----------|
143
+ | 哔哩哔哩 (B站) | `bilibili.com/video/`, `b23.tv`, `bili*.cn`, `b23.wtf`, `bili2233.cn` | 视频 |
144
+ | 抖音 | `douyin.com/video/`, `v.douyin.com` | 短视频、图集、实况 |
145
+ | 快手 | `kuaishou.com/short-video/`, `v.kuaishou.com`, `kuaishou.com/f/` | 短视频、图集 |
146
+ | 小红书 | `xiaohongshu.com/discovery/item/`, `xhslink.com`(含多级路径), `xiaohongshu.com/explore/`, `xiaohongshu.com/board/` | 图文、视频 |
147
+ | 微博 | `weibo.com/数字/`, `video.weibo.com/show`, `t.cn`, `m.weibo.cn` | 视频、图集 |
148
+ | 西瓜视频 | `ixigua.com` | 短视频 |
149
+ | YouTube | `youtube.com/watch`, `youtu.be`, `youtube.com/shorts/` | 视频 |
150
+ | TikTok | `tiktok.com/@/video/`, `vm.tiktok.com`, `vt.tiktok.com` | 短视频 |
151
+ | AcFun(A站) | `acfun.cn/v/ac` | 视频 |
152
+ | 知乎 | `zhihu.com/video/`, `zhihu.com/question/xxx/answer/xxx`, `zhuanlan.zhihu.com/p/`, `zhihu.com/zvideo/` | 视频、回答中的视频 |
153
+ | 微视 | `weishi.qq.com/weishi/feed/` | 短视频 |
154
+ | 虎牙 | `huya.com/video/` | 直播回放、视频 |
155
+ | 好看视频 | `haokan.baidu.com/v?vid=` | 短视频 |
156
+ | 美拍 | `meipai.com/media/` | 短视频 |
157
+ | Twitter / X | `twitter.com/用户名/status/`, `x.com/用户名/status/` | 视频、图文 |
158
+ | Instagram | `instagram.com/p/`, `instagram.com/reel/`, `instagram.com/share/` | 图文、Reels |
159
+ | 豆包(视频) | `doubao.com/video/`, `doubao.com/video-sharing` | 视频 |
160
+ | 豆包(图集) | `doubao.com/thread/` | 图文 |
161
+ | **即梦 (Jimeng)** | `jimeng.jianying.com`, `jimeng.cn`, `dreamina.jianying.com`, `dreamina.capcut.com` | AI视频、AI图片 |
162
+ | 绿洲 (Oasis) | `oasis.weibo.com/v/` | 视频、图文 |
163
+ | 视频号 (WeChat Channels) | `channels.weixin.qq.com`, `weixin.qq.com/sph/` | 短视频 |
164
+ | 梨视频 | `pearvideo.com/video_`, `video.li` | 短视频 |
165
+ | 全民直播 | `quanmin.tv`, `quanmintv.cn` | 直播 |
166
+ | 皮皮搞笑 | `h5.pipigx.com/pp/post/`, `ippzone.com` | 短视频 |
167
+ | 皮皮虾 | `pipix.com`, `pipixia.com` | 短视频 |
168
+ | 最右 | `share.xiaochuankeji.cn/hybrid/share/post`, `izuiyou.com` | 短视频 |
169
+ | 🔧 自定义平台 | 通过 `customPlatforms` 配置添加 | 取决于提供的 API |
174
170
 
175
171
  ## 项目贡献者 (Contributors)
176
172