- def extract_subtitles(self, video_id, video_webpage=None):
- """ returns {sub_lang: sub} or {} if subtitles not found """
- if self._downloader.params.get('writesubtitles', False) or self._downloader.params.get('allsubtitles', False):
- available_subs_list = self._get_available_subtitles(video_id)
- elif self._downloader.params.get('writeautomaticsub', False):
- available_subs_list = self._get_available_automatic_caption(video_id, video_webpage)
- else:
+ def extract_subtitles(self, video_id, webpage):
+ """
+ returns {sub_lang: sub} ,{} if subtitles not found or None if the
+ subtitles aren't requested.
+ """
+ if not self._have_to_download_any_subtitles: