diff options
author | felix <felix.von.s@posteo.de> | 2022-02-04 14:37:02 +0100 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-18 04:26:43 +0530 |
commit | 77f9033095cd8e1092a80db67f2b577cf13f95a8 (patch) | |
tree | d3124c5be0d7b00d225da2edd1f5f7e244aef88f /yt_dlp/webvtt.py | |
parent | 19a0394044bfad36cd665450271b8eb048a41c02 (diff) | |
download | hypervideo-pre-77f9033095cd8e1092a80db67f2b577cf13f95a8.tar.lz hypervideo-pre-77f9033095cd8e1092a80db67f2b577cf13f95a8.tar.xz hypervideo-pre-77f9033095cd8e1092a80db67f2b577cf13f95a8.zip |
[compat] Split into sub-modules (#2173)
Authored by: fstirlitz, pukkandan
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) |