fix(route/gamer): 熱門推薦 改為 本板推薦 (#19796)

Co-authored-by: Kenny Fong <kennyfong@shkp.com>
This commit is contained in:
Kenny Fong 2025-08-11 19:12:41 +08:00 committed by GitHub
parent 2caafc7308
commit 5f00a5e92a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 5 deletions

View File

@ -19,13 +19,13 @@ export const route: Route = {
supportPodcast: false,
supportScihub: false,
},
name: '熱門推薦',
maintainers: ['nczitzk', 'TonyRL'],
name: '本板推薦',
maintainers: ['nczitzk', 'TonyRL', 'kennyfong19931'],
handler,
};
async function handler(ctx) {
const rootUrl = `https://forum.gamer.com.tw/A.php?bsn=${ctx.req.param('bsn')}`;
const rootUrl = `https://forum.gamer.com.tw/B.php?bsn=${ctx.req.param('bsn')}`;
const response = await got({
url: rootUrl,
headers: {
@ -34,12 +34,12 @@ async function handler(ctx) {
});
const $ = load(response.data);
const list = $('div.FM-abox2A a.FM-abox2B')
const list = $('div.popular__card-list div.popular__card-img a')
.toArray()
.map((item) => {
item = $(item);
return {
link: `https:${item.attr('href')}`,
link: item.attr('href'),
};
});