From fd43ff21e28d5f50621ba17a81868d9bbadac6bd Mon Sep 17 00:00:00 2001 From: Kyle Gonsalves Date: Thu, 25 Apr 2024 09:53:20 -0700 Subject: [PATCH] comments --- yt_dlp/extractor/bbc.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/bbc.py b/yt_dlp/extractor/bbc.py index 1addae237..990640d2b 100644 --- a/yt_dlp/extractor/bbc.py +++ b/yt_dlp/extractor/bbc.py @@ -1140,7 +1140,7 @@ class BBCIE(BBCCoUkIE): # XXX: Do not subclass from concrete IE entry = self.url_result( f'https://www.bbc.co.uk/programmes/{video_id}', BBCCoUkIE, video_id, url_transparent=True) - entry = { + entry.update({ **traverse_obj(morph_payload, ( 'body', 'content', 'article', { 'timestamp': ('dateTimeInfo', 'dateTime', {parse_iso8601}), @@ -1151,7 +1151,7 @@ class BBCIE(BBCCoUkIE): # XXX: Do not subclass from concrete IE 'title': (('title', 'caption'), {str}, any), 'duration': ('duration', {parse_duration}), }), - } + }) if video_data.get('isLead') and not self._yes_playlist(playlist_id, video_id): return entry entries.append(entry) @@ -1367,8 +1367,7 @@ class BBCIE(BBCCoUkIE): # XXX: Do not subclass from concrete IE elif name == 'article': for block in traverse_obj(resp, ( 'data', (None, ('content', 'model')), 'blocks', - lambda _, v: v.get('type') in {'media', 'video'}, - 'model', {dict})): + is_type('media', 'video'), 'model', {dict})): parse_media(block) return self.playlist_result( entries, playlist_id, playlist_title, playlist_description)