aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2014-05-08 22:07:14 +0700
committerSergey M․ <dstftw@gmail.com>2014-05-08 22:07:14 +0700
commitf71959fcf5f900b742c336bae402261fbbd8e897 (patch)
tree5ed557f7ef669bc89b0c391f5fb2d62c7b67dd6e /youtube_dl/extractor
parent5c9f3b8b168a2847c4c1378e5d87a11352710723 (diff)
[nfb] Add support for videos with captions (#2866)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/nfb.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/youtube_dl/extractor/nfb.py b/youtube_dl/extractor/nfb.py
index e88566c69..ba7b77a46 100644
--- a/youtube_dl/extractor/nfb.py
+++ b/youtube_dl/extractor/nfb.py
@@ -73,14 +73,16 @@ class NFBIE(InfoExtractor):
title = media.find('title').text
description = media.find('description').text
# It seems assets always go from lower to better quality, so no need to sort
- formats = [{
- 'url': x.find('default/streamerURI').text,
- 'app': x.find('default/streamerURI').text.split('/', 3)[3],
- 'play_path': x.find('default/url').text,
- 'rtmp_live': False,
- 'ext': 'mp4',
- 'format_id': x.get('quality'),
- } for x in media.findall('assets/asset')]
+ for asset in media.findall('assets/asset'):
+ for x in asset:
+ formats.append({
+ 'url': x.find('streamerURI').text,
+ 'app': x.find('streamerURI').text.split('/', 3)[3],
+ 'play_path': x.find('url').text,
+ 'rtmp_live': False,
+ 'ext': 'mp4',
+ 'format_id': '%s-%s' % (x.tag, asset.get('quality')),
+ })
return {
'id': video_id,