From 56e6484642dc3bbaebdab54e9644b5f0718b2be8 Mon Sep 17 00:00:00 2001 From: zhiyu1998 <542716863@qq.com> Date: Tue, 28 May 2024 21:07:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=84=20reactor:=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=B8=80=E4=BA=9B=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/tools.js b/apps/tools.js index 6842658..97d4695 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -254,7 +254,7 @@ export class tools extends plugin { cookie: this.douyinCookie, }; const dyApi = DY_INFO.replace("{}", douId); - // xg参数 + // a-bogus参数 const abParam = aBogus.generate_a_bogus( new URLSearchParams(new URL(dyApi).search).toString(), headers["User-Agent"], @@ -262,9 +262,11 @@ export class tools extends plugin { // const param = resp.data.result[0].paramsencode; const resDyApi = `${ dyApi }&a_bogus=${ abParam }`; headers['Referer'] = `https://www.douyin.com/video/${ douId }` + // 定义一个dy请求 const dyResponse = () => axios.get(resDyApi, { headers, }); + // 如果失败进行3次重试 const data = await retryAxiosReq(dyResponse) // logger.info(data) const item = await data.aweme_detail;