]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[ted] Always extract the subtitles
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 21 Feb 2015 21:33:11 +0000 (22:33 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 21 Feb 2015 23:27:59 +0000 (00:27 +0100)
The required info is already in the webpage

youtube_dl/extractor/ted.py

index 1809eaae403a4a35dcf6e90a33633fc4529bbf94..0c38c8f899b218b9d663c1fe908e6431aceb0631 100644 (file)
@@ -163,8 +163,6 @@ class TEDIE(InfoExtractor):
         self._sort_formats(formats)
 
         video_id = compat_str(talk_info['id'])
-        # subtitles
-        video_subtitles = self.extract_subtitles(video_id, talk_info)
 
         thumbnail = talk_info['thumb']
         if not thumbnail.startswith('http'):
@@ -175,7 +173,7 @@ class TEDIE(InfoExtractor):
             'uploader': talk_info['speaker'],
             'thumbnail': thumbnail,
             'description': self._og_search_description(webpage),
-            'subtitles': video_subtitles,
+            'subtitles': self._get_subtitles(video_id, talk_info),
             'formats': formats,
             'duration': talk_info.get('duration'),
         }
@@ -194,7 +192,6 @@ class TEDIE(InfoExtractor):
                 ]
             return sub_lang_list
         else:
-            self._downloader.report_warning('video doesn\'t have subtitles')
             return {}
 
     def _watch_info(self, url, name):