YoutubeSubscriptionsIE: raise an error if there's no login information.
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Mon, 8 Jul 2013 09:23:05 +0000 (11:23 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Mon, 8 Jul 2013 09:24:11 +0000 (11:24 +0200)
youtube_dl/extractor/youtube.py

index 0de3bb0b333c6957f15f290bdb6d0f8566a545c3..61b7b561f46e4dbe835704dd24d79c358c27278b 100644 (file)
@@ -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