diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-12-30 11:57:33 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-12-30 12:10:57 +0530 |
commit | f74371a97d67237e055612006602934b910b1275 (patch) | |
tree | a017192421020369faa8a4906a7967168b7764c9 | |
parent | d5f043d127cac1e8ec8a6eacde04ad1133600a16 (diff) | |
download | hypervideo-pre-f74371a97d67237e055612006602934b910b1275.tar.lz hypervideo-pre-f74371a97d67237e055612006602934b910b1275.tar.xz hypervideo-pre-f74371a97d67237e055612006602934b910b1275.zip |
[extractor/bilibili] Fix `--no-playlist` for anthology
Closes #5797
-rw-r--r-- | yt_dlp/extractor/bilibili.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/yt_dlp/extractor/bilibili.py b/yt_dlp/extractor/bilibili.py index 37711c138..92620f697 100644 --- a/yt_dlp/extractor/bilibili.py +++ b/yt_dlp/extractor/bilibili.py @@ -303,7 +303,8 @@ class BiliBiliIE(BilibiliBaseIE): getter=lambda entry: f'https://www.bilibili.com/video/{video_id}?p={entry["page"]}') if is_anthology: - title += f' p{part_id:02d} {traverse_obj(page_list_json, ((part_id or 1) - 1, "part")) or ""}' + part_id = part_id or 1 + title += f' p{part_id:02d} {traverse_obj(page_list_json, (part_id - 1, "part")) or ""}' aid = video_data.get('aid') old_video_id = format_field(aid, None, f'%s_part{part_id or 1}') |