mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-31 22:55:18 +00:00
[utils] Add get_first
This commit is contained in:
@@ -39,6 +39,7 @@ from ..utils import (
|
||||
ExtractorError,
|
||||
float_or_none,
|
||||
format_field,
|
||||
get_first,
|
||||
int_or_none,
|
||||
is_html,
|
||||
join_nonempty,
|
||||
@@ -72,10 +73,6 @@ from ..utils import (
|
||||
)
|
||||
|
||||
|
||||
def get_first(obj, keys, **kwargs):
|
||||
return traverse_obj(obj, (..., *variadic(keys)), **kwargs, get_all=False)
|
||||
|
||||
|
||||
# any clients starting with _ cannot be explicity requested by the user
|
||||
INNERTUBE_CLIENTS = {
|
||||
'web': {
|
||||
|
||||
Reference in New Issue
Block a user