fix(route): 「141jav」和「141ppv」路由失效 (#16354)
This commit is contained in:
+25
-21
@@ -10,49 +10,53 @@ import { art } from '@/utils/render';
|
||||
import path from 'node:path';
|
||||
|
||||
export const route: Route = {
|
||||
path: '/{.*}?',
|
||||
path: '/:type/:keyword{.*}?',
|
||||
categories: ['multimedia'],
|
||||
name: '通用',
|
||||
maintainers: ['cgkings', 'nczitzk'],
|
||||
parameters: { type: '类型,可查看下表的类型说明', keyword: '关键词,可查看下表的关键词说明' },
|
||||
handler,
|
||||
description: `**类型**
|
||||
|
||||
| 最新 | 热门 | 随机 | 指定演员 | 指定标签 |
|
||||
| ---- | ------- | ------ | -------- | -------- |
|
||||
| new | popular | random | actress | tag |
|
||||
| 最新 | 热门 | 随机 | 指定演员 | 指定标签 | 日期 |
|
||||
| ---- | ------- | ------ | -------- | -------- | ---- |
|
||||
| new | popular | random | actress | tag | date |
|
||||
|
||||
**关键词**
|
||||
**关键词**
|
||||
|
||||
| 空 | 日期范围 | 演员名 | 标签名 |
|
||||
| -- | ----------- | ------------ | -------------- |
|
||||
| | 7 / 30 / 60 | Yua%20Mikami | Adult%20Awards |
|
||||
| 空 | 日期范围 | 演员名 | 标签名 | 年月日 |
|
||||
| -- | ----------- | ------------ | -------------- | ---------- |
|
||||
| | 7 / 30 / 60 | Yua%20Mikami | Adult%20Awards | 2020/07/30 |
|
||||
|
||||
**示例说明**
|
||||
**示例说明**
|
||||
|
||||
- \`/141jav/new\`
|
||||
- \`/141jav/new\`
|
||||
|
||||
仅当类型为 \`new\` \`popular\` 或 \`random\` 时关键词为 **空**
|
||||
仅当类型为 \`new\` \`popular\` 或 \`random\` 时关键词为 **空**
|
||||
|
||||
- \`/141jav/popular/30\`
|
||||
- \`/141jav/popular/30\`
|
||||
|
||||
\`popular\` \`random\` 类型的关键词可填写 \`7\` \`30\` 或 \`60\` 三个 **日期范围** 之一,分别对应 **7 天**、**30 天** 或 **60 天内**
|
||||
\`popular\` \`random\` 类型的关键词可填写 \`7\` \`30\` 或 \`60\` 三个 **日期范围** 之一,分别对应 **7 天**、**30 天** 或 **60 天内**
|
||||
|
||||
- \`/141jav/actress/Yua%20Mikami\`
|
||||
- \`/141jav/actress/Yua%20Mikami\`
|
||||
|
||||
\`actress\` 类型的关键词必须填写 **演员名** ,可在 [此处](https://141jav.com/actress) 演员单页链接中获取
|
||||
\`actress\` 类型的关键词必须填写 **演员名** ,可在 [此处](https://141jav.com/actress/) 演员单页链接中获取
|
||||
|
||||
- \`/141jav/tag/Adult%20Awards\`
|
||||
- \`/141jav/tag/Adult%20Awards\`
|
||||
|
||||
\`tag\` 类型的关键词必须填写 **标签名** 且标签中的 \`/\` 必须替换为 \`%2F\` ,可在 [此处](https://141jav.com/tag) 标签单页链接中获取
|
||||
\`tag\` 类型的关键词必须填写 **标签名** 且标签中的 \`/\` 必须替换为 \`%2F\` ,可在 [此处](https://141jav.com/tag/) 标签单页链接中获取
|
||||
|
||||
- \`/141jav/date/2020/07/30\`
|
||||
- \`/141jav/date/2020/07/30\`
|
||||
|
||||
\`date\` 类型的关键词必须填写 **日期**`,
|
||||
handler,
|
||||
\`date\` 类型的关键词必须填写 **日期(年/月/日)**`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
const rootUrl = 'https://www.141jav.com';
|
||||
const currentUrl = `${rootUrl}${getSubPath(ctx)}`;
|
||||
const type = ctx.req.param('type');
|
||||
const keyword = ctx.req.param('keyword') ?? '';
|
||||
|
||||
const currentUrl = `${rootUrl}/${type}${keyword ? `/${keyword}` : ''}`;
|
||||
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
|
||||
+24
-20
@@ -10,49 +10,53 @@ import { art } from '@/utils/render';
|
||||
import path from 'node:path';
|
||||
|
||||
export const route: Route = {
|
||||
path: '/{.*}?',
|
||||
path: '/:type/:keyword{.*}?',
|
||||
categories: ['multimedia'],
|
||||
name: '通用',
|
||||
maintainers: ['cgkings', 'nczitzk'],
|
||||
parameters: { type: '类型,可查看下表的类型说明', keyword: '关键词,可查看下表的关键词说明' },
|
||||
handler,
|
||||
description: `**类型**
|
||||
|
||||
| 最新 | 热门 | 随机 | 指定演员 | 指定标签 |
|
||||
| ---- | ------- | ------ | -------- | -------- |
|
||||
| new | popular | random | actress | tag |
|
||||
| 最新 | 热门 | 随机 | 指定演员 | 指定标签 | 日期 |
|
||||
| ---- | ------- | ------ | -------- | -------- | ---- |
|
||||
| new | popular | random | actress | tag | date |
|
||||
|
||||
**关键词**
|
||||
**关键词**
|
||||
|
||||
| 空 | 日期范围 | 演员名 | 标签名 |
|
||||
| -- | ----------- | ------------ | -------------- |
|
||||
| | 7 / 30 / 60 | Yua%20Mikami | Adult%20Awards |
|
||||
| 空 | 日期范围 | 演员名 | 标签名 | 年月日 |
|
||||
| -- | ----------- | ------------ | -------------- | ---------- |
|
||||
| | 7 / 30 / 60 | Yua%20Mikami | Adult%20Awards | 2020/07/30 |
|
||||
|
||||
**示例说明**
|
||||
**示例说明**
|
||||
|
||||
- \`/141ppv/new\`
|
||||
- \`/141ppv/new\`
|
||||
|
||||
仅当类型为 \`new\` \`popular\` 或 \`random\` 时关键词为 **空**
|
||||
仅当类型为 \`new\` \`popular\` 或 \`random\` 时关键词为 **空**
|
||||
|
||||
- \`/141ppv/popular/30\`
|
||||
- \`/141ppv/popular/30\`
|
||||
|
||||
\`popular\` \`random\` 类型的关键词可填写 \`7\` \`30\` 或 \`60\` 三个 **日期范围** 之一,分别对应 **7 天**、**30 天** 或 **60 天内**
|
||||
\`popular\` \`random\` 类型的关键词可填写 \`7\` \`30\` 或 \`60\` 三个 **日期范围** 之一,分别对应 **7 天**、**30 天** 或 **60 天内**
|
||||
|
||||
- \`/141ppv/actress/Yua%20Mikami\`
|
||||
- \`/141ppv/actress/Yua%20Mikami\`
|
||||
|
||||
\`actress\` 类型的关键词必须填写 **演员名** ,可在 [此处](https://141ppv.com/actress) 演员单页链接中获取
|
||||
\`actress\` 类型的关键词必须填写 **演员名** ,可在 [此处](https://141ppv.com/actress/) 演员单页链接中获取
|
||||
|
||||
- \`/141ppv/tag/Adult%20Awards\`
|
||||
- \`/141ppv/tag/Adult%20Awards\`
|
||||
|
||||
\`tag\` 类型的关键词必须填写 **标签名** 且标签中的 \`/\` 必须替换为 \`%2F\` ,可在 [此处](https://141ppv.com/tag) 标签单页链接中获取
|
||||
\`tag\` 类型的关键词必须填写 **标签名** 且标签中的 \`/\` 必须替换为 \`%2F\` ,可在 [此处](https://141ppv.com/tag/) 标签单页链接中获取
|
||||
|
||||
- \`/141ppv/date/2020/07/30\`
|
||||
- \`/141ppv/date/2020/07/30\`
|
||||
|
||||
\`date\` 类型的关键词必须填写 **日期**`,
|
||||
\`date\` 类型的关键词必须填写 **日期(年/月/日)**`,
|
||||
};
|
||||
|
||||
async function handler(ctx) {
|
||||
const rootUrl = 'https://www.141ppv.com';
|
||||
const currentUrl = `${rootUrl}${getSubPath(ctx)}`;
|
||||
const type = ctx.req.param('type');
|
||||
const keyword = ctx.req.param('keyword') ?? '';
|
||||
|
||||
const currentUrl = `${rootUrl}/${type}${keyword ? `/${keyword}` : ''}`;
|
||||
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
|
||||
Reference in New Issue
Block a user