1
0
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:
pukkandan
2022-03-09 02:24:41 +05:30
parent a3b7dff015
commit ff91cf7483
4 changed files with 11 additions and 11 deletions

View File

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