Skip to content

Commit

Permalink
feat(request): bilibili.app.viewunite.v1.View/View
Browse files Browse the repository at this point in the history
Update request.dev.js
  • Loading branch information
VirgilClyne committed Nov 1, 2024
1 parent 3e2d91d commit a3007c7
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/request.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(综合)
Expand All @@ -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;
}
Expand Down

0 comments on commit a3007c7

Please sign in to comment.