From 444830003c8fe78218fd68ec0e9bbca9200ad01a Mon Sep 17 00:00:00 2001 From: zhiyu <542716863@qq.com> Date: Thu, 25 Jan 2024 12:52:01 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8Dxhs?= =?UTF-8?q?=E7=9F=AD=E9=93=BE=E6=8E=A5=E8=A7=A3=E6=9E=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 7 +++++-- config/version.yaml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index 651196c..0c1b5b0 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -71,7 +71,7 @@ export class tools extends plugin { fnc: "literature", }, { - reg: "^#清理data垃圾$", + reg: "^清理data垃圾$", fnc: "clearTrash", permission: "master", }, @@ -566,7 +566,10 @@ export class tools extends plugin { redirect: "follow", }).then(resp => { const uri = decodeURIComponent(resp.url); - id = /explore\/(\w+)/.exec(uri)?.[1]; + // 如果出现了网页验证uri:https://www.xiaohongshu.com/website-login/captcha?redirectPath=https://www.xiaohongshu.com/discovery/item/63c93ac3000000002203b28a?app_platform=android&app_version=8.23.1&author_share=1&ignoreEngage=true&share_from_user_hidden=true&type=normal&xhsshare=CopyLink&appuid=62c58b90000000000303dc54&apptime=1706149572&exSource=&verifyUuid=a5f32b62-453e-426b-98fe-2cfe0c16776d&verifyType=102&verifyBiz=461 + const verify = uri.match(/\/item\/([0-9a-fA-F]+)/); + // 一般情况下不会出现问题就使用这个正则 + id = /explore\/(\w+)/.exec(uri)?.[1] ?? verify?.[1]; }); } else { id = /explore\/(\w+)/.exec(msgUrl)?.[1] || /discovery\/item\/(\w+)/.exec(msgUrl)?.[1]; diff --git a/config/version.yaml b/config/version.yaml index c5fbb65..970a54b 100644 --- a/config/version.yaml +++ b/config/version.yaml @@ -1,5 +1,5 @@ - { - version: 1.1.2, + version: 1.1.3, data: [ 新增快手解析功能,