From 6dcef70b8e5a9543d842f5c9b653e883add26286 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 11 Mar 2024 17:50:50 +0100 Subject: [PATCH] skip empty subtitle, #663 --- tubearchivist/home/src/index/subtitle.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tubearchivist/home/src/index/subtitle.py b/tubearchivist/home/src/index/subtitle.py index b57ad55b..56973519 100644 --- a/tubearchivist/home/src/index/subtitle.py +++ b/tubearchivist/home/src/index/subtitle.py @@ -128,6 +128,10 @@ class YoutubeSubtitle: print(response.text) continue + if not response.text: + print(f"{self.video.youtube_id}: skip empty subtitle") + continue + parser = SubtitleParser(response.text, lang, source) parser.process() if not parser.all_cues: