Revert to use merge_dicts and fix flake

This reverts commit b0593ecfa4.
pull/9705/head
Kyle Gonsalves 6 months ago
parent b0593ecfa4
commit bb87bafce6

@ -17,6 +17,7 @@ from ..utils import (
int_or_none, int_or_none,
join_nonempty, join_nonempty,
js_to_json, js_to_json,
merge_dicts,
parse_duration, parse_duration,
parse_iso8601, parse_iso8601,
parse_qs, parse_qs,
@ -1397,23 +1398,20 @@ class BBCIE(BBCCoUkIE): # XXX: Do not subclass from concrete IE
'tbr': ('bitrate', {k_int_or_none}), 'tbr': ('bitrate', {k_int_or_none}),
}, {lambda u: u.get('url') and u})) }, {lambda u: u.get('url') and u}))
if formats: if formats:
entry = { entry = merge_dicts({
'id': block_id, 'id': block_id,
'display_id': playlist_id, 'display_id': playlist_id,
'formats': formats, 'formats': formats,
**traverse_obj(simorgh_data, ( }, traverse_obj(simorgh_data, ('pageData', 'promo', {
'pageData', 'promo', { 'description': ('summary', {str}),
'description': ('summary', {str}), })), traverse_obj(model, {
} 'title': ('title', {str}),
)), 'thumbnail': ('imageUrl', {lambda u: urljoin(url, u.replace('$recipe', 'raw'))}),
**traverse_obj(model, { 'description': (
'title': ('title', {str}), 'synopses', ('long', 'medium', 'short'), {str}, any),
'thumbnail': ('imageUrl', {lambda u: urljoin(url, u.replace('$recipe', 'raw'))}), 'timestamp': ('firstPublished', {k_int_or_none}),
'description': ( }),
'synopses', ('long', 'medium', 'short'), {str}, any), )
'timestamp': ('firstPublished', {k_int_or_none}),
}),
}
done = True done = True
if entry: if entry:
entries.append(entry) entries.append(entry)

Loading…
Cancel
Save