0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-17 01:25:11 +00:00

[extractor/bilibili] Fix --no-playlist for anthology

Closes #5797
This commit is contained in:
pukkandan 2022-12-30 11:57:33 +05:30
parent d5f043d127
commit f74371a97d
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39

View file

@ -303,7 +303,8 @@ def _real_extract(self, url):
getter=lambda entry: f'https://www.bilibili.com/video/{video_id}?p={entry["page"]}') getter=lambda entry: f'https://www.bilibili.com/video/{video_id}?p={entry["page"]}')
if is_anthology: 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') aid = video_data.get('aid')
old_video_id = format_field(aid, None, f'%s_part{part_id or 1}') old_video_id = format_field(aid, None, f'%s_part{part_id or 1}')