Merge pull request #80 from xiowo/master

🚑 patch: 修复快手卡片解析
This commit is contained in:
CSSZYF 2025-06-27 22:21:55 +08:00 committed by GitHub
commit 4d1b212f6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -169,7 +169,7 @@ export class tools extends plugin {
fnc: "bodianMusic",
},
{
reg: "(kuaishou.com|ixigua.com|h5.pipix.com|h5.pipigx.com|s.xsj.qq.com|m.okjike.com)",
reg: "(chenzhongtech.com|kuaishou.com|ixigua.com|h5.pipix.com|h5.pipigx.com|s.xsj.qq.com|m.okjike.com)",
fnc: "general",
},
{

View File

@ -43,7 +43,7 @@ class GeneralLinkAdapter {
// 例子https://www.kuaishou.com/short-video/3xkfs8p4pnd67p4?authorId=3xkznsztpwetngu&streamSource=find&area=homexxbrilliant
// https://v.m.chenzhongtech.com/fw/photo/3xburnkmj3auazc
// https://v.kuaishou.com/1ff8QP
let msg = /(?:https?:\/\/)?(www|v)\.kuaishou\.com\/[A-Za-z\d._?%&+\-=\/#]*/g.exec(link)[0];
let msg = /(?:https?:\/\/)?(www|v)\.(kuaishou|m\.chenzhongtech)\.com\/[A-Za-z\d._?%&+\-=\/#]*/g.exec(link)[0];
// 跳转短号
if (msg.includes("v.kuaishou")) {
msg = await this.fetchUrl(msg, true);
@ -127,7 +127,7 @@ class GeneralLinkAdapter {
async init(link) {
logger.mark("[R插件][通用解析]", link)
const handlers = new Map([
[/kuaishou.com/, this.ks.bind(this)],
[/(kuaishou.com|chenzhongtech.com)/, this.ks.bind(this)],
[/ixigua.com/, this.xigua.bind(this)],
[/h5.pipix.com/, this.pipixia.bind(this)],
[/h5.pipigx.com/, this.pipigx.bind(this)],