Browse Source

[ted] Always extract the subtitles

The required info is already in the webpage
totalwebcasting
Jaime Marquínez Ferrándiz 10 years ago
parent
commit
03091e372f
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      youtube_dl/extractor/ted.py

+ 1
- 4
youtube_dl/extractor/ted.py View File

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


Loading…
Cancel
Save