mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-06 01:22:35 +00:00
YoutubeIE: If not subtitles language is given default to English for automatic captions (related #901)
This commit is contained in:
parent
50d2376769
commit
e704f4d378
@ -420,7 +420,7 @@ class YoutubeIE(InfoExtractor):
|
|||||||
def _request_automatic_caption(self, video_id, webpage):
|
def _request_automatic_caption(self, video_id, webpage):
|
||||||
"""We need the webpage for getting the captions url, pass it as an
|
"""We need the webpage for getting the captions url, pass it as an
|
||||||
argument to speed up the process."""
|
argument to speed up the process."""
|
||||||
sub_lang = self._downloader.params.get('subtitleslang')
|
sub_lang = self._downloader.params.get('subtitleslang') or 'en'
|
||||||
sub_format = self._downloader.params.get('subtitlesformat')
|
sub_format = self._downloader.params.get('subtitlesformat')
|
||||||
self.to_screen(u'%s: Looking for automatic captions' % video_id)
|
self.to_screen(u'%s: Looking for automatic captions' % video_id)
|
||||||
mobj = re.search(r';ytplayer.config = ({.*?});', webpage)
|
mobj = re.search(r';ytplayer.config = ({.*?});', webpage)
|
||||||
|
Loading…
Reference in New Issue
Block a user