aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Pauls <avpauls@gmail.com>2024-07-01 23:30:07 +0700
committerGitHub <noreply@github.com>2024-07-01 18:30:07 +0200
commit36e8dd832579b5375a0f6626af4268b86b4eb21a (patch)
tree0f3000b372004a9955291f31c4d8ac5016dbd447
parente6a22834df1776ec4e486526f6df2bf53cb7e06f (diff)
[ie/pokergo] Make metadata extraction non-fatal (#10319)
Authored by: axpauls
-rw-r--r--yt_dlp/extractor/pokergo.py3
1 files changed, 2 insertions, 1 deletions
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 @@ from ..utils import (
ExtractorError,
try_get,
)
+from ..utils.traversal import traverse_obj
class PokerGoBaseIE(InfoExtractor):
@@ -65,7 +66,7 @@ class PokerGoIE(PokerGoBaseIE):
'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',