fix(route/3dmgame): fix route error (#19133)
This commit is contained in:
@@ -34,7 +34,7 @@ export const route: Route = {
|
||||
|
||||
async function handler(ctx) {
|
||||
const { category = '' } = ctx.req.param();
|
||||
const isArcPost = category && !Number.isNaN(category); // https://www.3dmgame.com/news/\d+/
|
||||
const isArcPost = category && !Number.isNaN(Number(category)); // https://www.3dmgame.com/news/\d+/
|
||||
const url = `https://www.3dmgame.com/${category === 'news_36_1' ? category : 'news/' + category}`;
|
||||
const res = await got(url);
|
||||
const $ = load(res.data);
|
||||
|
||||
Reference in New Issue
Block a user