[smotri] Use raise_login_required
authorSergey M․ <dstftw@gmail.com>
Wed, 26 Aug 2015 15:26:35 +0000 (21:26 +0600)
committerSergey M․ <dstftw@gmail.com>
Wed, 26 Aug 2015 15:26:35 +0000 (21:26 +0600)
youtube_dl/extractor/smotri.py

index 93a7cfe15cc764bc61b912dd2e3283d950790565..35a81ee87fda041cb8208793e3f4fe34d3445cfd 100644 (file)
@@ -330,10 +330,7 @@ class SmotriBroadcastIE(InfoExtractor):
 
             (username, password) = self._get_login_info()
             if username is None:
-                raise ExtractorError(
-                    'Erotic broadcasts allowed only for registered users, '
-                    'use --username and --password options to provide account credentials.',
-                    expected=True)
+                self.raise_login_required('Erotic broadcasts allowed only for registered users')
 
             login_form = {
                 'login-hint53': '1',