mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-09 07:47:06 +01:00
Merge 9efe2e969b
into e1b3fa242c
This commit is contained in:
commit
4066d0a113
@ -10,6 +10,7 @@ from ..utils import (
|
|||||||
remove_start,
|
remove_start,
|
||||||
smuggle_url,
|
smuggle_url,
|
||||||
try_get,
|
try_get,
|
||||||
|
url_or_none,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -52,10 +53,25 @@ class TVerIE(InfoExtractor):
|
|||||||
self.BRIGHTCOVE_URL_TEMPLATE % (p_id, r_id),
|
self.BRIGHTCOVE_URL_TEMPLATE % (p_id, r_id),
|
||||||
{'geo_countries': ['JP']})
|
{'geo_countries': ['JP']})
|
||||||
|
|
||||||
|
thumbnail = None
|
||||||
|
thumbnails = []
|
||||||
|
imgs = try_get(main, lambda x: x['images'][0], dict)
|
||||||
|
if imgs:
|
||||||
|
for q in ('small', 'image', 'large'):
|
||||||
|
img_url = url_or_none(imgs.get(q))
|
||||||
|
if img_url:
|
||||||
|
thumbnail = img_url
|
||||||
|
thumbnails.append({
|
||||||
|
'url': thumbnail,
|
||||||
|
'preference': len(thumbnails),
|
||||||
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'_type': 'url_transparent',
|
'_type': 'url_transparent',
|
||||||
'description': try_get(main, lambda x: x['note'][0]['text'], compat_str),
|
'description': try_get(main, lambda x: x['note'][0]['text'], compat_str),
|
||||||
'episode_number': int_or_none(try_get(main, lambda x: x['ext']['episode_number'])),
|
'episode_number': int_or_none(try_get(main, lambda x: x['ext']['episode_number'])),
|
||||||
'url': bc_url,
|
'url': bc_url,
|
||||||
'ie_key': 'BrightcoveNew',
|
'ie_key': 'BrightcoveNew',
|
||||||
|
'thumbnail': thumbnail,
|
||||||
|
'thumbnails': thumbnails,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user