Browse Source

[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.
totalwebcasting
Philipp Hagemeister 10 years ago
parent
commit
6b445558ff
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      youtube_dl/extractor/youtube.py

+ 3
- 2
youtube_dl/extractor/youtube.py View File

@ -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()


Loading…
Cancel
Save