mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-03 19:29:51 +01:00
[ted] Always extract the subtitles
The required info is already in the webpage
This commit is contained in:
parent
4d17184817
commit
03091e372f
@ -163,8 +163,6 @@ def _talk_info(self, url, video_name):
|
||||
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 @@ def _talk_info(self, url, video_name):
|
||||
'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 @@ def _get_subtitles(self, video_id, talk_info):
|
||||
]
|
||||
return sub_lang_list
|
||||
else:
|
||||
self._downloader.report_warning('video doesn\'t have subtitles')
|
||||
return {}
|
||||
|
||||
def _watch_info(self, url, name):
|
||||
|
Loading…
Reference in New Issue
Block a user