diff --git a/lib/routes/bangumi/tv/other/followrank.ts b/lib/routes/bangumi/tv/other/followrank.ts
index 3271ac28a..c0b466daf 100644
--- a/lib/routes/bangumi/tv/other/followrank.ts
+++ b/lib/routes/bangumi/tv/other/followrank.ts
@@ -7,7 +7,7 @@ export const route: Route = {
path: '/:type/followrank',
categories: ['anime'],
example: '/bangumi/anime/followrank',
- parameters: { type: '类型:anime - 动画, book - 图书, music - 音乐, game - 游戏, real - 三次元' },
+ parameters: { type: '类型:anime - 动画,book - 图书,music - 音乐,game - 游戏,real - 三次元' },
features: {
requireConfig: false,
requirePuppeteer: false,
@@ -23,7 +23,7 @@ export const route: Route = {
},
],
name: '成员关注榜',
- maintainers: ['honue', 'zhoukuncheng'],
+ maintainers: ['honue', 'zhoukuncheng', 'NekoAria'],
handler,
};
@@ -42,25 +42,22 @@ async function handler(ctx) {
const $ = load(response);
- const items = [
- ...$('#columnB > div:nth-child(4) > table > tbody')
- .find('tr')
- .toArray()
- .map((item) => {
- const aTag = $(item).children('td').next().find('a');
- return {
- title: aTag.html(),
- link: 'https://bgm.tv' + aTag.attr('href'),
- };
- }),
- ...$('#chl_subitem > ul')
- .find('li')
- .toArray()
- .map((item) => ({
- title: $(item).children('a').attr('title'),
- link: 'https://bgm.tv' + $(item).children('a').attr('href'),
- })),
- ];
+ const items = $('.featuredItems .mainItem')
+ .map((_, item) => {
+ const $item = $(item);
+ const link = 'https://bgm.tv' + $item.find('a').first().attr('href');
+ const imageUrl = $item
+ .find('.image')
+ .attr('style')
+ ?.match(/url\((.*?)\)/)?.[1];
+ const info = $item.find('small.grey').text();
+ return {
+ title: $item.find('.title').text().trim(),
+ link,
+ description: `
${info}`,
+ };
+ })
+ .toArray();
const RANK_TYPES = {
tv: '动画',
@@ -75,6 +72,6 @@ async function handler(ctx) {
title: `BangumiTV 成员关注${RANK_TYPES[type]}榜`,
link: url,
item: items,
- description: `BangumiTV 首页-成员关注${RANK_TYPES[type]}榜`,
+ description: `BangumiTV 首页 - 成员关注${RANK_TYPES[type]}榜`,
};
}