fix(route/gamer): 熱門推薦 改為 本板推薦 (#19796)
Co-authored-by: Kenny Fong <kennyfong@shkp.com>
This commit is contained in:
parent
2caafc7308
commit
5f00a5e92a
|
|
@ -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'),
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue