From f352a0977879a6210b1519036fc75e9d423f277c Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 20 Nov 2022 14:12:23 +0530 Subject: [PATCH] [webvtt] Handle premature EOF Closes #2867, closes #5600 Authored by: flashdagger --- yt_dlp/webvtt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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])+')