mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-04 15:52:52 +08:00
[pluralsight] do not extract videos if user doesn't have permission
This commit is contained in:
parent
4137196899
commit
acd96480fc
@ -110,6 +110,10 @@ class PluralsightIE(InfoExtractor):
|
|||||||
if clip_index is None:
|
if clip_index is None:
|
||||||
continue
|
continue
|
||||||
if compat_str(clip_index) == clip_id:
|
if compat_str(clip_index) == clip_id:
|
||||||
|
if module_.get('authorized') is False:
|
||||||
|
raise ExtractorError(
|
||||||
|
'%s said: Your current subscription level does not allow you to view this module.' % self.IE_NAME,
|
||||||
|
expected=True)
|
||||||
clip = clip_
|
clip = clip_
|
||||||
break
|
break
|
||||||
|
|
||||||
@ -215,7 +219,7 @@ class PluralsightCourseIE(InfoExtractor):
|
|||||||
for module in course_data:
|
for module in course_data:
|
||||||
for clip in module.get('clips', []):
|
for clip in module.get('clips', []):
|
||||||
player_parameters = clip.get('playerParameters')
|
player_parameters = clip.get('playerParameters')
|
||||||
if not player_parameters:
|
if not player_parameters or clip.get('userMayViewClip') is False:
|
||||||
continue
|
continue
|
||||||
entries.append(self.url_result(
|
entries.append(self.url_result(
|
||||||
'http://www.pluralsight.com/training/player?%s' % player_parameters,
|
'http://www.pluralsight.com/training/player?%s' % player_parameters,
|
||||||
|
Loading…
Reference in New Issue
Block a user