From d7d69020b511622d83f6e61930f20f28543b8a7f Mon Sep 17 00:00:00 2001 From: zhiyu1998 Date: Thu, 16 Mar 2023 23:10:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8Ddy?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E7=89=87=E6=97=A0=E6=B3=95=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index e46a09a..e6c24df 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -119,8 +119,7 @@ export class tools extends plugin { const douUrl = urlRex.exec(e.msg.trim())[0]; await this.douyinRequest(douUrl).then(async res => { - const douRex = /.*video\/(\d+)\/(.*?)/g; - const douId = douRex.exec(res)[1]; + const douId = /note\/(\d+)/g.exec(res)?.[1] || /video\/(\d+)/g.exec(res)?.[1]; // 且行且珍惜,下面是已经过期的两个抖音api,获取难度越来越大 // const url = `https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=${ douId }`; // const url = `https://www.iesdouyin.com/aweme/v1/web/aweme/detail/?aweme_id=${ douId }&aid=1128&version_name=23.5.0&device_platform=android&os_version=2333`;