]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[ted] simplify
authorPhilipp Hagemeister <phihag@phihag.de>
Fri, 15 Nov 2013 13:06:38 +0000 (14:06 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Fri, 15 Nov 2013 13:06:38 +0000 (14:06 +0100)
youtube_dl/extractor/ted.py

index 76cfdfb90c886a94e95cb60b144e93b3f0acbb1a..8001ca5a325f71a493a42ab9738df83410a8611b 100644 (file)
@@ -85,7 +85,7 @@ class TEDIE(SubtitlesInfoExtractor):
             'ext': 'mp4',
             'url': stream['file'],
             'format': stream['id']
-            } for stream in info['htmlStreams']]
+        } for stream in info['htmlStreams']]
 
         video_id = info['id']
 
@@ -95,7 +95,7 @@ class TEDIE(SubtitlesInfoExtractor):
             self._list_available_subtitles(video_id, webpage)
             return
 
-        info = {
+        return {
             'id': video_id,
             'title': title,
             'thumbnail': thumbnail,
@@ -104,11 +104,6 @@ class TEDIE(SubtitlesInfoExtractor):
             'formats': formats,
         }
 
-        # TODO: Remove when #980 has been merged
-        info.update(info['formats'][-1])
-
-        return info
-
     def _get_available_subtitles(self, video_id, webpage):
         try:
             options = self._search_regex(r'(?:<select name="subtitles_language_select" id="subtitles_language_select">)(.*?)(?:</select>)', webpage, 'subtitles_language_select', flags=re.DOTALL)