From 3a3996a36855583663d733296bef6069952d60ed Mon Sep 17 00:00:00 2001 From: zhiyu <542716863@qq.com> Date: Sat, 10 Feb 2024 01:22:47 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20V1.3.4=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dxg=E8=A7=86=E9=A2=91=E6=97=A0=E6=B3=95=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E7=9F=AD=E9=93=BE=E6=8E=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 修复ks“https://v.ixigua.com/ienrQ5bR/”的链接无法解析问题,感谢群友《下次一定》提供 --- apps/tools.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/tools.js b/apps/tools.js index e4e4ed8..e6a0d92 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -1030,7 +1030,17 @@ export class tools extends plugin { // 1. https://v.ixigua.com/ienrQ5bR/ // 2. https://www.ixigua.com/7270448082586698281 // 3. https://m.ixigua.com/video/7270448082586698281 - const msg = /(?:https?:\/\/)?(www|v|m)\.ixigua\.com\/[A-Za-z\d._?%&+\-=\/#]*/g.exec(e.msg)[0]; + let msg = /(?:https?:\/\/)?(www|v|m)\.ixigua\.com\/[A-Za-z\d._?%&+\-=\/#]*/g.exec(e.msg)[0]; + // 跳转短号 + if (msg.includes("v.ixigua")) { + await fetch(msg, { + headers: { + 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36', + } + }).then(resp => { + msg = resp.url; + }) + } e.reply("识别:🍉视频"); const id = /ixigua\.com\/(\d+)/.exec(msg)[1] || /\/video\/(\d+)/.exec(msg)[1];