Compare commits

...

2 Commits

Author SHA1 Message Date
pukkandan 706272edd2
style nitpick 6 months ago
pukkandan 221a3c6dba
Update yt_dlp/extractor/bbc.py
Co-authored-by: dirkf <fieldhouse@gmx.net>
6 months ago

@ -1291,8 +1291,7 @@ class BBCIE(BBCCoUkIE): # XXX: Do not subclass from concrete IE
**traverse_obj(model, {
'title': ('title', {str}),
'thumbnail': ('imageUrl', {lambda u: urljoin(url, u.replace('$recipe', 'raw'))}),
'description': (
'synopses', ('long', 'medium', 'short'), {str}, any),
'description': ('synopses', ('long', 'medium', 'short'), {str}, any),
'duration': ('versions', 0, 'duration', {int}),
'timestamp': ('versions', 0, 'availableFrom', {k_int_or_none}),
})
@ -1359,8 +1358,8 @@ class BBCIE(BBCCoUkIE): # XXX: Do not subclass from concrete IE
'description': strip_or_none(item_desc),
})
for resp in (initial_data.get('data') or {}).values():
name = resp.get('name')
for resp in traverse_obj(initial_data, ('data', lambda _, v: v['name'])):
name = resp['name']
if name == 'media-experience':
parse_media(try_get(resp, lambda x: x['data']['initialItem']['mediaItem'], dict))
elif name == 'article':
@ -1406,9 +1405,7 @@ class BBCIE(BBCCoUkIE): # XXX: Do not subclass from concrete IE
**traverse_obj(model, {
'title': ('title', {str}),
'thumbnail': ('imageUrl', {lambda u: urljoin(url, u.replace('$recipe', 'raw'))}),
'description': (
'synopses', ('long', 'medium', 'short'), {str}, any
),
'description': ('synopses', ('long', 'medium', 'short'), {str}, any),
'timestamp': ('firstPublished', {k_int_or_none}),
}),
}

Loading…
Cancel
Save