[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

@@ -15,6 +15,7 @@ from ..compat import (
from ..utils import (
ExtractorError,
HEADRequest,
get_first,
int_or_none,
join_nonempty,
LazyList,
@@ -816,8 +817,7 @@ class DouyinIE(TikTokIE):
render_data = self._parse_json(
render_data_json, video_id, transform_source=compat_urllib_parse_unquote)
return self._parse_aweme_video_web(
traverse_obj(render_data, (..., 'aweme', 'detail'), get_all=False), url)
return self._parse_aweme_video_web(get_first(render_data, ('aweme', 'detail')), url)
class TikTokVMIE(InfoExtractor):