about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-07-08 11:23:05 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-07-08 11:24:11 +0200
commit81f0259b9e4321b612c90709a043ff90d2b0a774 (patch)
tree1141f913ed1d569e280e7c11a25277ecd9a0f7d0
parentfefcb5d314577bdcfeadf63f88859512892a938b (diff)
downloadyoutube-dl-81f0259b9e4321b612c90709a043ff90d2b0a774.tar.gz
youtube-dl-81f0259b9e4321b612c90709a043ff90d2b0a774.tar.xz
youtube-dl-81f0259b9e4321b612c90709a043ff90d2b0a774.zip
YoutubeSubscriptionsIE: raise an error if there's no login information.
-rw-r--r--youtube_dl/extractor/youtube.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 0de3bb0b3..61b7b561f 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -865,6 +865,12 @@ class YoutubeSubscriptionsIE(YoutubeIE):
     def suitable(cls, url):
         return re.match(cls._VALID_URL, url) is not None
 
+    def _real_initialize(self):
+        (username, password) = self._get_login_info()
+        if username is None:
+            raise ExtractorError(u'No login info available, needed for downloading the Youtube subscriptions.', expected=True)
+        super(YoutubeSubscriptionsIE, self)._real_initialize()
+
     def _real_extract(self, url):
         feed_entries = []
         # The step argument is available only in 2.7 or higher