fix(route/3dmgame): fix route error (#19133)

This commit is contained in:
hirrao
2025-05-19 23:18:41 +08:00
committed by GitHub
parent c276eb9661
commit 48ee4935c8
+1 -1
View File
@@ -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);