From a3007c76c9687f0c41a756b3d5330a2a50bf2151 Mon Sep 17 00:00:00 2001 From: Virgil Clyne Date: Fri, 1 Nov 2024 12:38:01 +0800 Subject: [PATCH] feat(request): bilibili.app.viewunite.v1.View/View Update request.dev.js --- src/request.dev.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/request.dev.js b/src/request.dev.js index 3222170..b617125 100644 --- a/src/request.dev.js +++ b/src/request.dev.js @@ -362,7 +362,8 @@ log(`⚠ FORMAT: ${FORMAT}`, ""); log(`🚧 信息组, infoGroup: ${JSON.stringify(infoGroup)}`, ""); // 请求策略 switch (PATH) { - case "/bilibili.app.viewunite.v1.View/View": // + case "/bilibili.app.viewunite.v1.View/View": // 番剧页面-内容-app + break; case "/pgc/view/v2/app/season": // 番剧页面-内容-app case "/pgc/view/web/season": // 番剧-内容-web case "/pgc/view/pc/season": // 番剧-内容-pc @@ -376,14 +377,15 @@ log(`⚠ FORMAT: ${FORMAT}`, ""); log("⚠ 不是 PGC, 跳过", ""); break; } - switch ( - $platform // 直通模式,不处理,否则无法进http-response - ) { + /* + switch ($platform) { + // 直通模式,不处理,否则无法进http-response case "Shadowrocket": case "Quantumult X": $request.policy = undefined; break; } + */ break; case "/all": // 搜索-全部结果-html(综合) case "/bilibili.polymer.app.search.v1.Search/SearchAll": // 搜索-全部结果-proto(综合) @@ -410,15 +412,12 @@ log(`⚠ FORMAT: ${FORMAT}`, ""); } break; } - if (!$response) { - // 无(构造)回复数据 - switch ($platform) { - // 已有指定策略的请求,根据策略fetch - case "Shadowrocket": - case "Quantumult X": - if ($request.policy) $response = await fetch($request); - break; - } + switch ($platform) { + // 已有指定策略的请求,根据策略fetch + case "Shadowrocket": + case "Quantumult X": + if ($request.policy && !$response) $response = await fetch($request); // 无(构造)回复数据 + break; } break; }