1
0
Fork 0

[OpenCast] Add extractors (#1905)

Original PR: https://github.com/ytdl-org/youtube-dl/pull/26934
Authored by: bwildenhain, C0D3D3V
This commit is contained in:
Benedikt Wildenhain 2021-12-24 23:05:23 +01:00 committed by GitHub
commit 4b4b7f746c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 183 additions and 2 deletions

View file

@ -5024,7 +5024,7 @@ def traverse_dict(dictn, keys, casesense=True):
return traverse_obj(dictn, keys, casesense=casesense, is_user_input=True, traverse_string=True)
def variadic(x, allowed_types=(str, bytes)):
def variadic(x, allowed_types=(str, bytes, dict)):
return x if isinstance(x, collections.abc.Iterable) and not isinstance(x, allowed_types) else (x,)