From 36e8dd832579b5375a0f6626af4268b86b4eb21a Mon Sep 17 00:00:00 2001 From: Alexander Pauls Date: Mon, 1 Jul 2024 23:30:07 +0700 Subject: [PATCH] [ie/pokergo] Make metadata extraction non-fatal (#10319) Authored by: axpauls --- yt_dlp/extractor/pokergo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/pokergo.py b/yt_dlp/extractor/pokergo.py index e22348053..72cbce0a0 100644 --- a/yt_dlp/extractor/pokergo.py +++ b/yt_dlp/extractor/pokergo.py @@ -5,6 +5,7 @@ ExtractorError, try_get, ) +from ..utils.traversal import traverse_obj class PokerGoBaseIE(InfoExtractor): @@ -65,7 +66,7 @@ def _real_extract(self, url): 'width': image.get('width'), 'height': image.get('height'), } for image in data_json.get('images') or [] if image.get('url')] - series_json = next(dct for dct in data_json.get('show_tags') or [] if dct.get('video_id') == video_id) or {} + series_json = traverse_obj(data_json, ('show_tags', lambda _, v: v['video_id'] == video_id, any)) or {} return { '_type': 'url_transparent',