about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-12-05 22:34:56 +0700
committerSergey M․ <dstftw@gmail.com>2017-12-05 22:34:56 +0700
commitc94427dd60f9836e3752077977cae3b4d0da47d1 (patch)
tree1ddd0c7943a6257aeab42a6200537f975264dccd
parentd4f05d473134d7bd61b054468e6ba297cef3c88f (diff)
downloadyoutube-dl-c94427dd60f9836e3752077977cae3b4d0da47d1.tar.gz
youtube-dl-c94427dd60f9836e3752077977cae3b4d0da47d1.tar.xz
youtube-dl-c94427dd60f9836e3752077977cae3b4d0da47d1.zip
[pluralsight] Detect agreement request (#14913)
-rw-r--r--youtube_dl/extractor/pluralsight.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/extractor/pluralsight.py b/youtube_dl/extractor/pluralsight.py
index 4bf0aa786..597b11218 100644
--- a/youtube_dl/extractor/pluralsight.py
+++ b/youtube_dl/extractor/pluralsight.py
@@ -131,6 +131,13 @@ class PluralsightIE(PluralsightBaseIE):
             if BLOCKED in response:
                 raise ExtractorError(
                     'Unable to login: %s' % BLOCKED, expected=True)
+            MUST_AGREE = 'To continue using Pluralsight, you must agree to'
+            if any(p in response for p in (MUST_AGREE, '>Disagree<', '>Agree<')):
+                raise ExtractorError(
+                    'Unable to login: %s some documents. Go to pluralsight.com, '
+                    'log in and agree with what Pluralsight requires.'
+                    % MUST_AGREE, expected=True)
+
             raise ExtractorError('Unable to log in')
 
     def _get_subtitles(self, author, clip_id, lang, name, duration, video_id):