aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel <flashdagger@googlemail.com>2022-11-20 14:12:23 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-11-20 14:14:42 +0530
commitf352a0977879a6210b1519036fc75e9d423f277c (patch)
tree5f2a8327972c84b3dd01194283bd14bb351e783c
parent02b2f9fa7de583f2bfdebe568f608c9b9398d316 (diff)
downloadhypervideo-pre-f352a0977879a6210b1519036fc75e9d423f277c.tar.lz
hypervideo-pre-f352a0977879a6210b1519036fc75e9d423f277c.tar.xz
hypervideo-pre-f352a0977879a6210b1519036fc75e9d423f277c.zip
[webvtt] Handle premature EOF
Closes #2867, closes #5600 Authored by: flashdagger
-rw-r--r--yt_dlp/webvtt.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/webvtt.py b/yt_dlp/webvtt.py
index 1138865ba..dd7298277 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])+')