projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f72e83
)
[extractor/common] Add raise_login_required
author
Sergey M․
<dstftw@gmail.com>
Wed, 26 Aug 2015 15:24:47 +0000
(21:24 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 26 Aug 2015 15:24:47 +0000
(21:24 +0600)
youtube_dl/extractor/common.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/common.py
b/youtube_dl/extractor/common.py
index 5d24bcb6a9571685035f456a00bcc6e20552e235..39cef9c5b99d1c47545455970344bc836c77494e 100644
(file)
--- a/
youtube_dl/extractor/common.py
+++ b/
youtube_dl/extractor/common.py
@@
-510,6
+510,12
@@
class InfoExtractor(object):
"""Report attempt to log in."""
self.to_screen('Logging in')
+ @staticmethod
+ def raise_login_required(msg='This video is only available for registered users'):
+ raise ExtractorError(
+ '%s. Use --username and --password or --netrc to provide account credentials.' % msg,
+ expected=True)
+
# Methods for following #608
@staticmethod
def url_result(url, ie=None, video_id=None, video_title=None):