mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-27 12:40:46 +00:00
[utils] traverse_obj: Fix more bugs
and cleanup uses of `default=[]`
Continued from b1bde57bef
This commit is contained in:
@@ -285,7 +285,7 @@ class TikTokBaseIE(InfoExtractor):
|
||||
user_url = self._UPLOADER_URL_FORMAT % (traverse_obj(author_info,
|
||||
'sec_uid', 'id', 'uid', 'unique_id',
|
||||
expected_type=str_or_none, get_all=False))
|
||||
labels = traverse_obj(aweme_detail, ('hybrid_label', ..., 'text'), expected_type=str, default=[])
|
||||
labels = traverse_obj(aweme_detail, ('hybrid_label', ..., 'text'), expected_type=str)
|
||||
|
||||
contained_music_track = traverse_obj(
|
||||
music_info, ('matched_song', 'title'), ('matched_pgc_sound', 'title'), expected_type=str)
|
||||
@@ -355,7 +355,7 @@ class TikTokBaseIE(InfoExtractor):
|
||||
'ext': 'mp4',
|
||||
'width': width,
|
||||
'height': height,
|
||||
} for url in traverse_obj(play_url, (..., 'src'), expected_type=url_or_none, default=[]) if url]
|
||||
} for url in traverse_obj(play_url, (..., 'src'), expected_type=url_or_none) if url]
|
||||
|
||||
download_url = url_or_none(video_info.get('downloadAddr')) or traverse_obj(video_info, ('download', 'url'), expected_type=url_or_none)
|
||||
if download_url:
|
||||
|
||||
Reference in New Issue
Block a user