From: Philipp Hagemeister Date: Wed, 22 Oct 2014 22:44:21 +0000 (+0200) Subject: [youtube] Only set language when necessary X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=6b445558ffe292c11327862ab510b1abf4e36616;p=youtube-dl [youtube] Only set language when necessary We only need to set the language when we are using a login; otherwise it will always be English. --- diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index cfae2de89..4ab56e0ac 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -191,8 +191,9 @@ class YoutubeBaseInfoExtractor(InfoExtractor): def _real_initialize(self): if self._downloader is None: return - if not self._set_language(): - return + if self._get_login_info()[0] is not None: + if not self._set_language(): + return if not self._login(): return self._confirm_age()