DIYgod / DIYgod/RSSHub

支持 RSSHub Radar 识别 B 站新版合集/系列列表页

Open
#22,429 0 comments 1 reaction 0 assignees View on GitHub
RSS enhancement
Dominant language
TypeScript
Stars
46.2k
Forks
10.2k
Avg merge
8h 48m
Merged PRs (30d)
175

Description

### 这是一个什么样的功能?

希望 RSSHub Radar 能在 B 站新版 UP 主「合集和系列」详情页上识别可用订阅源,例如:

- `https://space.bilibili.com/1032385857/lists/8010120?type=season`
- `https://space.bilibili.com/2267573/lists/396050?type=series`

这两类页面当前已经能分别对应到 RSSHub 现有路由:

- `type=season`:`/bilibili/user/collection/:uid/:sid`
- `type=series`:`/bilibili/user/channel/:uid/:sid`

但当前 Radar 规则里没有覆盖新版 `/lists/:sid` 页面,因此浏览器插件无法在这些页面上发现对应 RSSHub 路由。

### 这个功能可以解决什么问题?

B 站现在的合集/系列详情页使用同一个 path:

`/lists/:sid`

并通过 query 参数区分类型:

- `?type=season` 表示「合集」,对应 B 站接口 `x/polymer/web-space/seasons_archives_list`,参数是 `season_id`
- `?type=series` 表示「系列」,对应 B 站接口 `x/series/series` / `x/series/archives`,参数是 `series_id`

如果 RSSHub Radar 只按 pathname 匹配 `space.bilibili.com/:uid/lists/:sid`,无法区分 `type=season` 和 `type=series`,可能生成错误订阅源。

例如:

`https://space.bilibili.com/2267573/lists/396050?type=series`

页面实际显示的是 `系列·怪物猎人实况`,应映射到:

`/bilibili/user/channel/2267573/396050`

但如果忽略 `type=series` 并映射到合集路由:

`/bilibili/user/collection/2267573/396050`

B 站 `seasons_archives_list` 接口会返回另一个合集 `合集·《藤女》`,且返回数据中的 `mid` 是另一个用户。这不是简单的 404,而是可能生成内容错误的 RSS。

### 额外描述

我查过现有 issue / PR,没有找到专门针对 B 站新版 `/lists/:sid?type=season|series` 页面和 Radar 识别的请求。

相关历史:

- https://github.com/DIYgod/RSSHub/issues/10162
- https://github.com/DIYgod/RSSHub/pull/10470
- https://github.com/DIYgod/RSSHub/pull/18183

可能的修复方向:

1. 让 Radar 规则支持按 query 参数区分匹配条件。
2. 然后为 B 站补充两条规则:
- `space.bilibili.com/:uid/lists/:sid?type=season` -> `/bilibili/user/collection/:uid/:sid`
- `space.bilibili.com/:uid/lists/:sid?type=series` -> `/bilibili/user/channel/:uid/:sid`

如果当前 Radar 规则设计不打算支持 query-aware matching,也可以先讨论是否有其它更合适的表达方式,避免错误地把所有 `/lists/:sid` 都映射到合集路由。

### 这不是重复的功能请求和 RSS 提案

- [x] 我已经搜索了 [现有 issue](https://github.com/DIYgod/RSSHub/issues),以确保这项功能尚未被请求及不是 [新的 RSS 提案](https://github.com/DIYgod/RSSHub/issues/new?assignees=&labels=RSS+proposal&template=rss_request_zh.yml)。

Contributor guide

Open the contributing guide

Research direction

Start by inspecting RSSHub Radar's existing Bilibili URL rules and how rule conditions are matched; compare the current pathname-only behavior with the two example /lists/:sid URLs. Done means season pages resolve to /bilibili/user/collection/:uid/:sid, series pages resolve to /bilibili/user/channel/:uid/:sid, and an unsupported or ambiguous query cannot produce the wrong feed.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.