add debug

This commit is contained in:
Antonio J. Delgado 2025-08-10 11:58:53 +03:00
parent caca298b52
commit 147374f554

View file

@ -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))