From 953d2fef3378c87cd812c69f5cafec7f19ed6e72 Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 12 Oct 2023 20:19:09 +0000 Subject: [PATCH] fix(route): javbus redirection (#13513) --- lib/v2/javbus/index.js | 6 ++++++ website/docs/routes/multimedia.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/lib/v2/javbus/index.js b/lib/v2/javbus/index.js index 4e1c92f3a..578738784 100644 --- a/lib/v2/javbus/index.js +++ b/lib/v2/javbus/index.js @@ -26,9 +26,14 @@ module.exports = async (ctx) => { const currentUrl = `${isWestern ? westernUrl : rootUrl}${ctx.path.replace(/^\/western/, '').replace(/\/home/, '')}`; + const headers = { + 'accept-language': 'zh-CN', + }; + const response = await got({ method: 'get', url: currentUrl, + headers, }); const $ = cheerio.load(response.data); @@ -52,6 +57,7 @@ module.exports = async (ctx) => { const detailResponse = await got({ method: 'get', url: item.link, + headers, }); const content = cheerio.load(detailResponse.data); diff --git a/website/docs/routes/multimedia.md b/website/docs/routes/multimedia.md index ee9eeb51f..78bccd41f 100644 --- a/website/docs/routes/multimedia.md +++ b/website/docs/routes/multimedia.md @@ -567,6 +567,12 @@ If you subscribe to [火曜ワイド「境界トラブル解決ラジオ!] (ht ## JavBus {#javbus} +:::warning + +Requests from non-Asia areas will be redirected to login page. + +::: + :::tip Language You can change the language of each route to the languages listed below.