From 709ee214170cdb3e91f68062a07f52d1a24a8c89 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Tue, 27 Sep 2022 08:25:31 +0530 Subject: [PATCH] [extractor/youtube] Do not warn on duplicate chapters Eg: vYbaM8w8yzw --- yt_dlp/extractor/youtube.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index c4aa6f8fe..a9d838345 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -3034,8 +3034,9 @@ def _extract_chapters(self, chapter_list, chapter_time, chapter_title, duration, self.report_warning(f'Incomplete chapter {idx}') elif chapters[-1]['start_time'] <= chapter['start_time'] <= duration: chapters.append(chapter) - else: - self.report_warning(f'Invalid start time for chapter "{chapter["title"]}"') + elif chapter not in chapters: + self.report_warning( + f'Invalid start time ({chapter["start_time"]} < {chapters[-1]["start_time"]}) for chapter "{chapter["title"]}"') return chapters[1:] def _extract_comment(self, comment_renderer, parent=None):