1
0
Fork 0
mirror of https://codeberg.org/polarisfm/youtube-dl.git synced 2024-12-27 01:56:52 +00:00

YoutubeSubscriptionsIE: raise an error if there's no login information.

This commit is contained in:
Jaime Marquínez Ferrándiz 2013-07-08 11:23:05 +02:00
parent fefcb5d314
commit 81f0259b9e

View file

@ -865,6 +865,12 @@ class YoutubeSubscriptionsIE(YoutubeIE):
def suitable(cls, url): def suitable(cls, url):
return re.match(cls._VALID_URL, url) is not None 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): def _real_extract(self, url):
feed_entries = [] feed_entries = []
# The step argument is available only in 2.7 or higher # The step argument is available only in 2.7 or higher