aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-08-26 21:26:24 +0600
committerSergey M․ <dstftw@gmail.com>2015-08-26 21:26:24 +0600
commite269d3ae7dbebb22d5b51bd5e6d477a69ae4f3b4 (patch)
treeb0060db86af8f6503ae9b32dde93af736bb15010 /youtube_dl/extractor
parente7ddaef5bd209dd8d24b0025631cde1f5969e71d (diff)
[safari] Use raise_login_required
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/safari.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/youtube_dl/extractor/safari.py b/youtube_dl/extractor/safari.py
index f3c80708c..a602af692 100644
--- a/youtube_dl/extractor/safari.py
+++ b/youtube_dl/extractor/safari.py
@@ -20,7 +20,6 @@ from ..utils import (
class SafariBaseIE(InfoExtractor):
_LOGIN_URL = 'https://www.safaribooksonline.com/accounts/login/'
_SUCCESSFUL_LOGIN_REGEX = r'<a href="/accounts/logout/"[^>]*>Sign Out</a>'
- _ACCOUNT_CREDENTIALS_HINT = 'Use --username and --password options to supply credentials for safaribooksonline.com'
_NETRC_MACHINE = 'safari'
_API_BASE = 'https://www.safaribooksonline.com/api/v1/book'
@@ -37,9 +36,7 @@ class SafariBaseIE(InfoExtractor):
def _login(self):
(username, password) = self._get_login_info()
if username is None:
- raise ExtractorError(
- self._ACCOUNT_CREDENTIALS_HINT,
- expected=True)
+ self.raise_login_required('safaribooksonline.com account is required')
headers = std_headers
if 'Referer' not in headers: