1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-06-30 05:01:21 +02:00

[brightcove] Extract all the available formats

This commit is contained in:
Jaime Marquínez Ferrándiz 2013-11-06 19:05:41 +01:00
parent 065472936a
commit b0759f0c19

View File

@ -146,10 +146,11 @@ def _extract_video_info(self, video_info):
renditions = video_info.get('renditions')
if renditions:
renditions = sorted(renditions, key=lambda r: r['size'])
best_format = renditions[-1]
info.update({
'url': best_format['defaultURL'],
})
info['formats'] = [{
'url': rend['defaultURL'],
'height': rend.get('frameHeight'),
'width': rend.get('frameWidth'),
} for rend in renditions]
elif video_info.get('FLVFullLengthURL') is not None:
info.update({
'url': video_info['FLVFullLengthURL'],