From 147374f554a435f5b3e372821a29f0916f27c9c4 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Sun, 10 Aug 2025 11:58:53 +0300 Subject: [PATCH] add debug --- get_youtube_videos/get_youtube_videos.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/get_youtube_videos/get_youtube_videos.py b/get_youtube_videos/get_youtube_videos.py index 9651b7e..d368434 100644 --- a/get_youtube_videos/get_youtube_videos.py +++ b/get_youtube_videos/get_youtube_videos.py @@ -409,13 +409,14 @@ class GetYoutubeVideos: ydl_opts['format'] = 'bestvideo+bestaudio[ext=m4a]/best' result = 'retrying (format error)' elif 'Unable to download video subtitles for' in f"{error}": + regex = r"Unable to download video subtitles for '([a-z]*)'" subtitle_match = re.match( - r"Unable to download video subtitles for '([a-z]*)'", + regex, f"{error}" ) if not subtitle_match: self._log.error( - f"Error finding subtitle that failed in error string" + f"Error finding subtitle that failed in error string. Regex: r\"{regex}\". Error string: \"{error}\"" ) else: ydl_opts['subtitleslangs'].pop(subtitle_match.group(1))