This commit is contained in:
Kyle Gonsalves 2024-04-25 09:53:20 -07:00
parent bb87bafce6
commit fd43ff21e2

View file

@ -1140,7 +1140,7 @@ def _real_extract(self, url):
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 @@ def _real_extract(self, url):
'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 @@ def parse_media(media):
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)