mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-27 00:43:06 +00:00
[extractor/common] Add raise_login_required
This commit is contained in:
parent
2f72e83bbd
commit
43e7d3c945
1 changed files with 6 additions and 0 deletions
|
@ -510,6 +510,12 @@ def report_login(self):
|
|||
"""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):
|
||||
|
|
Loading…
Reference in a new issue