A feature-rich command-line audio/video downloader
[pluralsight] Improve authentication (closes #17762)
Sergey M․21c1a00dd7db
diff --git a/youtube_dl/extractor/pluralsight.py b/youtube_dl/extractor/pluralsight.pyindex daf1725702..eafe56897d 100644--- a/youtube_dl/extractor/pluralsight.py+++ b/youtube_dl/extractor/pluralsight.py@@ -4,6 +4,7 @@ import collectionsimport jsonimport osimport random+import refrom .common import InfoExtractorfrom ..compat import (@@ -196,7 +197,10 @@ query viewClip {if error:raise ExtractorError('Unable to login: %s' % error, expected=True)- if all(p not in response for p in ('__INITIAL_STATE__', '"currentUser"')):+ if all(not re.search(p, response) for p in (+ r'__INITIAL_STATE__', r'["\']currentUser["\']',+ # new layout?+ r'>\s*Sign out\s*<')):BLOCKED = 'Your account has been blocked due to suspicious activity'if BLOCKED in response:raise ExtractorError(