diff options
author | Philipp Hagemeister <[email protected]> | 2014-10-23 00:44:21 +0200 |
---|---|---|
committer | Philipp Hagemeister <[email protected]> | 2014-10-23 00:44:22 +0200 |
commit | 6b445558ffe292c11327862ab510b1abf4e36616 (patch) | |
tree | c75bfa42780b5dabdfa5071026dde63b1d478a02 | |
parent | 6bf6962062ff674013d8651e190998b506c681e5 (diff) | |
download | youtube-dl-6b445558ffe292c11327862ab510b1abf4e36616.tar.gz youtube-dl-6b445558ffe292c11327862ab510b1abf4e36616.zip |
[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.
-rw-r--r-- | youtube_dl/extractor/youtube.py | 5 |
1 files changed, 3 insertions, 2 deletions
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() |