koishi-plugin-video-parser-all 1.4.2 → 1.4.3
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 +39 -39
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -295,45 +295,45 @@ function debugLog(level, ...args) {
|
|
|
295
295
|
logger.info(`[${new Date().toISOString()}] [${level}] ${args.map(a => typeof a === 'object' ? JSON.stringify(a) : String(a)).join(' ')}`);
|
|
296
296
|
}
|
|
297
297
|
const BUILTIN_LINK_RULES = [
|
|
298
|
-
{ pattern: /https?:\/\/(?:www\.)?bilibili\.com\/video\/([ab]v[0-9a-zA-Z_-]+)
|
|
299
|
-
{ pattern: /https?:\/\/b23\.tv\/[0-9a-zA-Z_-]{5,}
|
|
300
|
-
{ pattern: /https?:\/\/bili\d+\.cn\/[0-9a-zA-Z_-]{5,}
|
|
301
|
-
{ pattern: /https?:\/\/(?:www\.)?douyin\.com\/video\/\d{10,}
|
|
302
|
-
{ pattern: /https?:\/\/v\.douyin\.com\/[0-9a-zA-Z_-]{8,}
|
|
303
|
-
{ pattern: /https?:\/\/(?:www\.)?kuaishou\.com\/short-video\/[0-9a-zA-Z_-]{10,}
|
|
304
|
-
{ pattern: /https?:\/\/v\.kuaishou\.com\/[0-9a-zA-Z_-]{8,}
|
|
305
|
-
{ pattern: /https?:\/\/(?:www\.)?xiaohongshu\.com\/discovery\/item\/[0-9a-zA-Z_-]{10,}
|
|
306
|
-
{ pattern: /https?:\/\/xhslink\.com\/[0-9a-zA-Z_-]{8,}
|
|
307
|
-
{ pattern: /https?:\/\/weibo\.com\/\d+\/[0-9a-zA-Z_-]{10,}
|
|
308
|
-
{ pattern: /https?:\/\/video\.weibo\.com\/show\?fid=[0-9a-zA-Z_-]{10,}
|
|
309
|
-
{ pattern: /https?:\/\/(?:www\.)?ixigua\.com\/\d{10,}
|
|
310
|
-
{ pattern: /https?:\/\/(?:www\.)?youtube\.com\/watch\?v=[a-zA-Z0-9_-]{11}
|
|
311
|
-
{ pattern: /https?:\/\/youtu\.be\/[a-zA-Z0-9_-]{11}
|
|
312
|
-
{ pattern: /https?:\/\/(?:www\.)?tiktok\.com\/@[\w.]+\/video\/\d{10,}
|
|
313
|
-
{ pattern: /https?:\/\/vm\.tiktok\.com\/[0-9a-zA-Z_-]{8,}
|
|
314
|
-
{ pattern: /https?:\/\/(?:www\.)?acfun\.cn\/v\/ac\d{10,}
|
|
315
|
-
{ pattern: /https?:\/\/(?:www\.)?zhihu\.com\/video\/\d{10,}
|
|
316
|
-
{ pattern: /https?:\/\/weishi\.qq\.com\/weishi\/feed\/[0-9a-zA-Z_-]{10,}
|
|
317
|
-
{ pattern: /https?:\/\/(?:www\.)?huya\.com\/video\/[0-9a-zA-Z_-]{10,}
|
|
318
|
-
{ pattern: /https?:\/\/haokan\.baidu\.com\/v\?vid=[0-9a-zA-Z_-]{10,}
|
|
319
|
-
{ pattern: /https?:\/\/(?:www\.)?meipai\.com\/media\/\d{10,}
|
|
320
|
-
{ pattern: /https?:\/\/twitter\.com\/\w+\/status\/\d{10,}
|
|
321
|
-
{ pattern: /https?:\/\/x\.com\/\w+\/status\/\d{10,}
|
|
322
|
-
{ pattern: /https?:\/\/(?:www\.)?instagram\.com\/p\/[0-9a-zA-Z_-]{10,}
|
|
323
|
-
{ pattern: /https?:\/\/(?:www\.)?doubao\.com\/video\/\d{10,}
|
|
324
|
-
{ pattern: /https?:\/\/(?:www\.)?oasis\.weibo\.com\/v\/[0-9a-zA-Z_-]
|
|
325
|
-
{ pattern: /https?:\/\/channels\.weixin\.qq\.com\/[0-9a-zA-Z_-]
|
|
326
|
-
{ pattern: /https?:\/\/weixin\.qq\.com\/sph\/[0-9a-zA-Z_-]
|
|
327
|
-
{ pattern: /https?:\/\/(?:www\.)?pearvideo\.com\/video_\d
|
|
328
|
-
{ pattern: /https?:\/\/video\.li\/[0-9a-zA-Z_-]{3,}
|
|
329
|
-
{ pattern: /https?:\/\/(?:www\.)?quanmin\.tv\/\w
|
|
330
|
-
{ pattern: /https?:\/\/(?:www\.)?quanmintv\.cn\/\w
|
|
331
|
-
{ pattern: /https?:\/\/h5\.pipigx\.com\/pp\/post\/\d
|
|
332
|
-
{ pattern: /https?:\/\/(?:www\.)?ippzone\.com\/\w
|
|
333
|
-
{ pattern: /https?:\/\/(?:h5|www)\.pipix\.com\/\w
|
|
334
|
-
{ pattern: /https?:\/\/(?:www\.)?pipixia\.com\/\w
|
|
335
|
-
{ pattern: /https?:\/\/share\.xiaochuankeji\.cn\/hybrid\/share\/post\?pid=\d
|
|
336
|
-
{ pattern: /https?:\/\/(?:h5|www)\.izuiyou\.com\/\w
|
|
298
|
+
{ pattern: /https?:\/\/(?:www\.)?bilibili\.com\/video\/([ab]v[0-9a-zA-Z_-]+)[^\s]*/gi, type: 'bilibili' },
|
|
299
|
+
{ pattern: /https?:\/\/b23\.tv\/[0-9a-zA-Z_-]{5,}[^\s]*/gi, type: 'bilibili' },
|
|
300
|
+
{ pattern: /https?:\/\/bili\d+\.cn\/[0-9a-zA-Z_-]{5,}[^\s]*/gi, type: 'bilibili' },
|
|
301
|
+
{ pattern: /https?:\/\/(?:www\.)?douyin\.com\/video\/\d{10,}[^\s]*/gi, type: 'douyin' },
|
|
302
|
+
{ pattern: /https?:\/\/v\.douyin\.com\/[0-9a-zA-Z_-]{8,}[^\s]*/gi, type: 'douyin' },
|
|
303
|
+
{ pattern: /https?:\/\/(?:www\.)?kuaishou\.com\/short-video\/[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'kuaishou' },
|
|
304
|
+
{ pattern: /https?:\/\/v\.kuaishou\.com\/[0-9a-zA-Z_-]{8,}[^\s]*/gi, type: 'kuaishou' },
|
|
305
|
+
{ pattern: /https?:\/\/(?:www\.)?xiaohongshu\.com\/discovery\/item\/[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'xiaohongshu' },
|
|
306
|
+
{ pattern: /https?:\/\/xhslink\.com\/[0-9a-zA-Z_-]{8,}[^\s]*/gi, type: 'xiaohongshu' },
|
|
307
|
+
{ pattern: /https?:\/\/weibo\.com\/\d+\/[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'weibo' },
|
|
308
|
+
{ pattern: /https?:\/\/video\.weibo\.com\/show\?fid=[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'weibo' },
|
|
309
|
+
{ pattern: /https?:\/\/(?:www\.)?ixigua\.com\/\d{10,}[^\s]*/gi, type: 'xigua' },
|
|
310
|
+
{ pattern: /https?:\/\/(?:www\.)?youtube\.com\/watch\?v=[a-zA-Z0-9_-]{11}[^\s]*/gi, type: 'youtube' },
|
|
311
|
+
{ pattern: /https?:\/\/youtu\.be\/[a-zA-Z0-9_-]{11}[^\s]*/gi, type: 'youtube' },
|
|
312
|
+
{ pattern: /https?:\/\/(?:www\.)?tiktok\.com\/@[\w.]+\/video\/\d{10,}[^\s]*/gi, type: 'tiktok' },
|
|
313
|
+
{ pattern: /https?:\/\/vm\.tiktok\.com\/[0-9a-zA-Z_-]{8,}[^\s]*/gi, type: 'tiktok' },
|
|
314
|
+
{ pattern: /https?:\/\/(?:www\.)?acfun\.cn\/v\/ac\d{10,}[^\s]*/gi, type: 'acfun' },
|
|
315
|
+
{ pattern: /https?:\/\/(?:www\.)?zhihu\.com\/video\/\d{10,}[^\s]*/gi, type: 'zhihu' },
|
|
316
|
+
{ pattern: /https?:\/\/weishi\.qq\.com\/weishi\/feed\/[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'weishi' },
|
|
317
|
+
{ pattern: /https?:\/\/(?:www\.)?huya\.com\/video\/[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'huya' },
|
|
318
|
+
{ pattern: /https?:\/\/haokan\.baidu\.com\/v\?vid=[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'haokan' },
|
|
319
|
+
{ pattern: /https?:\/\/(?:www\.)?meipai\.com\/media\/\d{10,}[^\s]*/gi, type: 'meipai' },
|
|
320
|
+
{ pattern: /https?:\/\/twitter\.com\/\w+\/status\/\d{10,}[^\s]*/gi, type: 'twitter' },
|
|
321
|
+
{ pattern: /https?:\/\/x\.com\/\w+\/status\/\d{10,}[^\s]*/gi, type: 'twitter' },
|
|
322
|
+
{ pattern: /https?:\/\/(?:www\.)?instagram\.com\/p\/[0-9a-zA-Z_-]{10,}[^\s]*/gi, type: 'instagram' },
|
|
323
|
+
{ pattern: /https?:\/\/(?:www\.)?doubao\.com\/video\/\d{10,}[^\s]*/gi, type: 'doubao' },
|
|
324
|
+
{ pattern: /https?:\/\/(?:www\.)?oasis\.weibo\.com\/v\/[0-9a-zA-Z_-]+[^\s]*/gi, type: 'oasis' },
|
|
325
|
+
{ pattern: /https?:\/\/channels\.weixin\.qq\.com\/[0-9a-zA-Z_-]+[^\s]*/gi, type: 'wechat_channel' },
|
|
326
|
+
{ pattern: /https?:\/\/weixin\.qq\.com\/sph\/[0-9a-zA-Z_-]+[^\s]*/gi, type: 'wechat_channel' },
|
|
327
|
+
{ pattern: /https?:\/\/(?:www\.)?pearvideo\.com\/video_\d+[^\s]*/gi, type: 'lishi' },
|
|
328
|
+
{ pattern: /https?:\/\/video\.li\/[0-9a-zA-Z_-]{3,}[^\s]*/gi, type: 'lishi' },
|
|
329
|
+
{ pattern: /https?:\/\/(?:www\.)?quanmin\.tv\/\w+[^\s]*/gi, type: 'quanmin' },
|
|
330
|
+
{ pattern: /https?:\/\/(?:www\.)?quanmintv\.cn\/\w+[^\s]*/gi, type: 'quanmin' },
|
|
331
|
+
{ pattern: /https?:\/\/h5\.pipigx\.com\/pp\/post\/\d+[^\s]*/gi, type: 'pipigx' },
|
|
332
|
+
{ pattern: /https?:\/\/(?:www\.)?ippzone\.com\/\w+[^\s]*/gi, type: 'pipigx' },
|
|
333
|
+
{ pattern: /https?:\/\/(?:h5|www)\.pipix\.com\/\w+[^\s]*/gi, type: 'pipixia' },
|
|
334
|
+
{ pattern: /https?:\/\/(?:www\.)?pipixia\.com\/\w+[^\s]*/gi, type: 'pipixia' },
|
|
335
|
+
{ pattern: /https?:\/\/share\.xiaochuankeji\.cn\/hybrid\/share\/post\?pid=\d+[^\s]*/gi, type: 'zuiyou' },
|
|
336
|
+
{ pattern: /https?:\/\/(?:h5|www)\.izuiyou\.com\/\w+[^\s]*/gi, type: 'zuiyou' },
|
|
337
337
|
];
|
|
338
338
|
function buildCustomLinkRules(customPlatforms) {
|
|
339
339
|
if (!Array.isArray(customPlatforms) || customPlatforms.length === 0)
|
package/package.json
CHANGED