aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/extractor/iqiyi.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-03-31 13:25:50 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-03-31 13:33:28 +0530
commite6f868a63c15f576152733a1508f474b5e5bd1ef (patch)
treec3ec5c413f3a137ade860345e076197eaaf93834 /yt_dlp/extractor/iqiyi.py
parentc4f60dd7cdbf5282a8d1a8fa8dd4f6fd60acc034 (diff)
[utils] `traverse_obj`: Allow filtering by value
Diffstat (limited to 'yt_dlp/extractor/iqiyi.py')
-rw-r--r--yt_dlp/extractor/iqiyi.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/extractor/iqiyi.py b/yt_dlp/extractor/iqiyi.py
index dc4667744..14877d405 100644
--- a/yt_dlp/extractor/iqiyi.py
+++ b/yt_dlp/extractor/iqiyi.py
@@ -626,8 +626,8 @@ class IqIE(InfoExtractor):
note=f'Downloading format data for {self._BID_TAGS[bid]}', errnote='Unable to download format data',
fatal=False), 'data', expected_type=dict)
- video_format = next((video_format for video_format in traverse_obj(
- format_data, ('program', 'video', ...), expected_type=dict, default=[]) if str(video_format['bid']) == bid), {})
+ video_format = traverse_obj(format_data, ('program', 'video', lambda _, v: str(v['bid']) == bid),
+ expected_type=dict, default=[], get_all=False) or {}
extracted_formats = []
if video_format.get('m3u8Url'):
extracted_formats.extend(self._extract_m3u8_formats(