]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/compat.py
[youtube:tab] Support channel search
[yt-dlp.git] / yt_dlp / compat.py
index 3ebf1ee7a6f02f48dc7a14bd85c1f87b685a9687..863bd2287cd9365bc3fba3c28731a9865c26bcfb 100644 (file)
@@ -3018,10 +3018,24 @@ def compat_ctypes_WINFUNCTYPE(*args, **kwargs):
         return ctypes.WINFUNCTYPE(*args, **kwargs)
 
 
+try:
+    compat_Pattern = re.Pattern
+except AttributeError:
+    compat_Pattern = type(re.compile(''))
+
+
+try:
+    compat_Match = re.Match
+except AttributeError:
+    compat_Match = type(re.compile('').match(''))
+
+
 __all__ = [
     'compat_HTMLParseError',
     'compat_HTMLParser',
     'compat_HTTPError',
+    'compat_Match',
+    'compat_Pattern',
     'compat_Struct',
     'compat_b64decode',
     'compat_basestring',