Skip to content

[Feature]支持P>1的分P的 Bilibili 视频解析 #371

@RSLN-creator

Description

@RSLN-creator

想解决什么问题?

选择P>1的分P的 Bilibili 视频会发现永远是P1内容

登录Bilibili cookies后读取字幕时候:
根因在 BiliNote 后端的 bilibili_subtitle.py 第 56-57 行:

# _get_video_info 只传 bvid,B站 API 始终返回 P1 的 cid
resp = requests.get(VIEW_URL, params={"bvid": bvid}, ...)
cid = info.get("cid")  # ← 永远是 P1 的 cid

建议方案

改法就是两行:从 URL 提取 ?p=2,传给 B站 API ?bvid=BVxxx&p=2。yt-dlp 下载音频本身是认 ?p=N 的,问题只在这个字幕直拉路径。
让_get_video_info 支持 page 参数,fetch_subtitles 从 URL 提取 ?p=N 传给 B站 API

备选方案

No response

涉及的工作区

后端 (backend/)

其他补充

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions