1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 00:25:08 +00:00

[youtube] Fix uploader for collaborative playlists (#3332)

Authored by: coletdjnz
This commit is contained in:
coletdev
2022-04-07 20:11:16 +12:00
committed by GitHub
parent 870efdee28
commit 61d3665d9d
2 changed files with 27 additions and 6 deletions

View File

@ -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: