aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/common.py
diff options
context:
space:
mode:
authorcoletdev <coletdjnz@protonmail.com>2022-04-07 20:11:16 +1200
committerGitHub <noreply@github.com>2022-04-07 01:11:16 -0700
commit61d3665d9da4f80c2c5cc4b6bed6a6830b29fcc3 (patch)
treeeb93912316bb7b4eedbf40c74c42ecba405c8fcc /yt_dlp/extractor/common.py
parent870efdee28860d7f6473c52bf7bb1bafb71aaeec (diff)
downloadhypervideo-pre-61d3665d9da4f80c2c5cc4b6bed6a6830b29fcc3.tar.lz
hypervideo-pre-61d3665d9da4f80c2c5cc4b6bed6a6830b29fcc3.tar.xz
hypervideo-pre-61d3665d9da4f80c2c5cc4b6bed6a6830b29fcc3.zip
[youtube] Fix uploader for collaborative playlists (#3332)
Authored by: coletdjnz
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r--yt_dlp/extractor/common.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index e2605c1f4..9914910d0 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -23,6 +23,7 @@ from ..compat import (
compat_getpass,
compat_http_client,
compat_os_name,
+ compat_Pattern,
compat_str,
compat_urllib_error,
compat_urllib_parse_unquote,
@@ -41,7 +42,6 @@ from ..utils import (
base_url,
bug_reports_message,
clean_html,
- compiled_regex_type,
determine_ext,
determine_protocol,
dict_get,
@@ -1203,7 +1203,9 @@ class InfoExtractor(object):
In case of failure return a default value or raise a WARNING or a
RegexNotFoundError, depending on fatal, specifying the field name.
"""
- if isinstance(pattern, (str, compat_str, compiled_regex_type)):
+ if string is None:
+ mobj = None
+ elif isinstance(pattern, (str, compat_Pattern)):
mobj = re.search(pattern, string, flags)
else:
for p in pattern: