mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 22:21:17 +01:00
[nfb] Add support for videos with captions (#2866)
This commit is contained in:
parent
5c9f3b8b16
commit
f71959fcf5
|
@ -73,14 +73,16 @@ def extract_thumbnail(media):
|
||||||
title = media.find('title').text
|
title = media.find('title').text
|
||||||
description = media.find('description').text
|
description = media.find('description').text
|
||||||
# It seems assets always go from lower to better quality, so no need to sort
|
# It seems assets always go from lower to better quality, so no need to sort
|
||||||
formats = [{
|
for asset in media.findall('assets/asset'):
|
||||||
'url': x.find('default/streamerURI').text,
|
for x in asset:
|
||||||
'app': x.find('default/streamerURI').text.split('/', 3)[3],
|
formats.append({
|
||||||
'play_path': x.find('default/url').text,
|
'url': x.find('streamerURI').text,
|
||||||
|
'app': x.find('streamerURI').text.split('/', 3)[3],
|
||||||
|
'play_path': x.find('url').text,
|
||||||
'rtmp_live': False,
|
'rtmp_live': False,
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'format_id': x.get('quality'),
|
'format_id': '%s-%s' % (x.tag, asset.get('quality')),
|
||||||
} for x in media.findall('assets/asset')]
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user