[utils] Add get_first
This commit is contained in:
parent
a3b7dff015
commit
ff91cf7483
4 changed files with 11 additions and 11 deletions
|
|
@ -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': {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue