fix(route): javbus redirection (#13513)
This commit is contained in:
parent
d296f8db92
commit
953d2fef33
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue