aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-10-04 10:32:34 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-10-04 10:32:34 +0200
commit0d8cb1cc14cde1b17385901ff97b8525bcc1cc5e (patch)
tree55d01453339339881cf37bfe3303e8c89aec93e1 /youtube_dl
parent3cd022f6e6696e6bc632f5bb2898191521acbb8b (diff)
downloadyoutube-dl-0d8cb1cc14cde1b17385901ff97b8525bcc1cc5e.tar.xz
[ted] Prepare #980 merge
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/ted.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/youtube_dl/extractor/ted.py b/youtube_dl/extractor/ted.py
index 4c11f7a03..dfa1176a3 100644
--- a/youtube_dl/extractor/ted.py
+++ b/youtube_dl/extractor/ted.py
@@ -77,12 +77,20 @@ class TEDIE(InfoExtractor):
thumbnail = self._search_regex(r'</span>[\s.]*</div>[\s.]*<img src="(.*?)"',
webpage, 'thumbnail')
+ formats = [{
+ 'ext': 'mp4',
+ 'url': stream['file'],
+ 'format': stream['id']
+ } for stream in info['htmlStreams']]
info = {
- 'id': info['id'],
- 'url': info['htmlStreams'][-1]['file'],
- 'ext': 'mp4',
- 'title': title,
- 'thumbnail': thumbnail,
- 'description': desc,
- }
+ 'id': info['id'],
+ 'title': title,
+ 'thumbnail': thumbnail,
+ 'description': desc,
+ 'formats': formats,
+ }
+
+ # TODO: Remove when #980 has been merged
+ info.update(info['formats'][-1])
+
return info