DIYgod/RSSHub · warning
This type of ranking is not supported yet
Error message
This type of ranking is not supported yet
What it means
Thrown by the ranking handler after getAPI() returns a ridType starting with 'pgc/' (i.e. 'pgc/web' or 'pgc/season'). The pgc ranking endpoints (bangumi/movie/tv/guochuang/documentary/variety — numeric rids 1,2,3,4,5,7) return a different response shape than the x/web-interface ranking API, and the handler does not implement parsing for them, so it explicitly refuses to proceed rather than returning malformed data. The route's `parameters.rid.options` already filters these out.
Source
Thrown at lib/routes/bilibili/ranking.ts:243
}
async function handler(ctx) {
const isJsonFeed = ctx.req.query('format') === 'json';
const args = ctx.req.param();
if (args.redirect1 || args.redirect2) {
// redirect old routes like /bilibili/ranking/0/3/1 or /bilibili/ranking/0/3/1/xxx
const embedArg = args.redirect2 ? '/' + args.redirect2 : '';
ctx.set('redirect', `/bilibili/ranking/${args.rid}${embedArg}`);
return null;
}
const rid = ctx.req.param('rid') || 'all';
const embed = !ctx.req.param('embed');
const isNumericRid = /^\d+$/.test(rid);
const { apiBase, apiParams, referer, ridChinese, link, ridType } = getAPI(isNumericRid, rid);
if (ridType.startsWith('pgc/')) {
throw new Error('This type of ranking is not supported yet');
}
const response = await ofetch(`${apiBase}?${apiParams}`, {
headers: {
Referer: referer,
origin: 'https://www.bilibili.com',
},
});
if (response.code !== 0) {
throw new Error(response.message);
}
const data = response.data || response.result;
const list = data.list || [];
return {
title: `bilibili 排行榜-${ridChinese}`,
link,
item: await Promise.all(View on GitHub (pinned to bed535e087)
Solutions
- Switch to a supported x/rid ranking: all, douga, game, kichiku, music, dance, cinephile, ent, knowledge, tech, food, car, fashion, sports, animal (or their numeric ids).
- For bangumi/movie rankings, use a different RSSHub route if one exists, or open a feature request to implement pgc response parsing.
- If you maintain this instance and need pgc support, implement parsing for the pgc/web and pgc/season response shapes in the handler and remove the guard.
Example fix
// before // /bilibili/ranking/bangumi -> 'This type of ranking is not supported yet' // /bilibili/ranking/movie -> 'This type of ranking is not supported yet' // after // /bilibili/ranking/all (supported) // /bilibili/ranking/douga (supported)
Defensive patterns
Strategy: validation
Validate before calling
// Block unsupported pgc rids before calling getAPI().
const PGC_SLUGS = new Set(['bangumi','movie','documentary','guochuang','tv','variety']);
function isUnsupportedPgcRid(rid: string): boolean {
return PGC_SLUGS.has(rid);
}
if (isUnsupportedPgcRid(rid)) {
throw new Error(`Ranking for '${rid}' (pgc) is not supported. Use an x/rid ranking like 'all'.`);
} Type guard
function isPgcSlug(rid: string): rid is 'bangumi'|'movie'|'documentary'|'guochuang'|'tv'|'variety' {
return ['bangumi','movie','documentary','guochuang','tv','variety'].includes(rid);
} Try / catch
try {
if (ridType.startsWith('pgc/')) throw new Error('This type of ranking is not supported yet');
} catch (e) {
if (e instanceof Error && /not supported/.test(e.message)) {
ctx.status = 501;
ctx.body = { error: `Ranking '${rid}' is pgc and not implemented; use an x/rid ranking.` };
return;
}
throw e;
} Prevention
- Only subscribe to slugs listed in the route's parameters.rid.options (the pgc ones are already filtered out).
- If you maintain the instance and need pgc rankings, implement the pgc/web + pgc/season response parsing before removing the guard.
- Document the unsupported set for feed consumers so they don't request bangumi/movie rankings.
When it happens
Trigger: GET /bilibili/ranking/:rid where :rid is a pgc slug — 'bangumi' (1), 'movie' (2), 'documentary' (3), 'guochuang' (4), 'tv' (5), 'variety' (7) — or the matching numeric id. The isNumericRid branch returns ridType 'x/rid' for any digit string, but a numeric pgc id like /bilibili/ranking/1 also resolves to ridType 'pgc/web' inside getAPI only when... actually numeric rids short-circuit to 'x/rid', so this fires primarily via the English-slug path for pgc entries.
Common situations: User requests a bangumi/movie ranking expecting parity with the all/douga feeds; reader migrated from an old RSSHub version that may have supported pgc; user guesses 'anime'/'movie' slugs.
Related errors
- Invalid rid
- Unknown product: ${product}
- Unknown order: ${order}
- Unknown order: ${order}
- Invalid rid type
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/5994321d89836102.
Report an issue: GitHub.