mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-28 08:52:33 +00:00
[lynda] Use raise_login_required
This commit is contained in:
parent
3c53455d15
commit
62984e4584
1 changed files with 1 additions and 3 deletions
|
@ -118,9 +118,7 @@ def _real_extract(self, url):
|
||||||
'lynda returned error: %s' % video_json['Message'], expected=True)
|
'lynda returned error: %s' % video_json['Message'], expected=True)
|
||||||
|
|
||||||
if video_json['HasAccess'] is False:
|
if video_json['HasAccess'] is False:
|
||||||
raise ExtractorError(
|
self.raise_login_required('Video %s is only available for members' % video_id)
|
||||||
'Video %s is only available for members. '
|
|
||||||
% video_id + self._ACCOUNT_CREDENTIALS_HINT, expected=True)
|
|
||||||
|
|
||||||
video_id = compat_str(video_json['ID'])
|
video_id = compat_str(video_json['ID'])
|
||||||
duration = video_json['DurationInSeconds']
|
duration = video_json['DurationInSeconds']
|
||||||
|
|
Loading…
Reference in a new issue