From 2d25b325f62a8f2d3d9652fb98613ab21faeea9e Mon Sep 17 00:00:00 2001 From: zhiyu1998 Date: Mon, 10 Apr 2023 15:43:07 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E9=80=82=E9=85=8D=E7=BD=91?= =?UTF-8?q?=E9=A1=B5xhs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index 075e349..8bce1ea 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -797,10 +797,13 @@ export class tools extends plugin { let msgUrl = /(http:|https:)\/\/(xhslink|xiaohongshu).com\/[A-Za-z\d._?%&+\-=\/#@]*/.exec( e.msg, - )?.[0] || - /(http:|https:)\/\/www\.xiaohongshu\.com\/discovery\/item\/(\w+)/.exec( + )?.[0] + || /(http:|https:)\/\/www\.xiaohongshu\.com\/discovery\/item\/(\w+)/.exec( e.message[0].data, - )?.[0]; + )?.[0] + || /(http:|https:)\/\/www\.xiaohongshu\.com\/explore\/(\w+)/.exec( + e.msg, + )?.[0] let id; if (msgUrl.includes("xhslink")) { await fetch(msgUrl, {