Skip to content

A feature-rich command-line audio/video downloader

[webvtt] Handle premature EOF

Marcelf352a0977879
diff --git a/yt_dlp/webvtt.py b/yt_dlp/webvtt.py
index 1138865ba3..dd72982778 100644
--- a/yt_dlp/webvtt.py
+++ b/yt_dlp/webvtt.py
@@ -93,7 +93,7 @@ _REGEX_TS = re.compile(r'''(?x)
([0-9]{3})?
''')
_REGEX_EOF = re.compile(r'\Z')
-_REGEX_NL = re.compile(r'(?:\r\n|[\r\n])')
+_REGEX_NL = re.compile(r'(?:\r\n|[\r\n]|$)')
_REGEX_BLANK = re.compile(r'(?:\r\n|[\r\n])+')