diff options
Diffstat (limited to 'yt_dlp/webvtt.py')
-rw-r--r-- | yt_dlp/webvtt.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/yt_dlp/webvtt.py b/yt_dlp/webvtt.py index 741622b25..4c222ba8e 100644 --- a/yt_dlp/webvtt.py +++ b/yt_dlp/webvtt.py @@ -9,9 +9,8 @@ in RFC 8216 ยง3.5 <https://tools.ietf.org/html/rfc8216#section-3.5>. """ import io -import re -from .compat import compat_Match, compat_Pattern +from .compat import re from .utils import int_or_none, timetuple_from_msec @@ -26,7 +25,7 @@ class _MatchParser: self._pos = 0 def match(self, r): - if isinstance(r, compat_Pattern): + if isinstance(r, re.Pattern): return r.match(self._data, self._pos) if isinstance(r, str): if self._data.startswith(r, self._pos): @@ -37,7 +36,7 @@ class _MatchParser: def advance(self, by): if by is None: amt = 0 - elif isinstance(by, compat_Match): + elif isinstance(by, re.Match): amt = len(by.group(0)) elif isinstance(by, str): amt = len(by) |