+ auto_lang = ",".join(auto_captions_list.keys())
+ self.to_screen('%s: Available automatic captions for video: %s' %
+ (video_id, auto_lang))
+
+ 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:
+ return None
+ available_subs_list = {}
+ if self._downloader.params.get('writeautomaticsub', False):
+ available_subs_list.update(self._get_available_automatic_caption(video_id, webpage))
+ if self._downloader.params.get('writesubtitles', False):
+ available_subs_list.update(self._get_available_subtitles(video_id, webpage))