From 7e508ff2cf8f8f8b1784db6fb33994839841d122 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergey=20M=E2=80=A4?= Date: Sat, 21 Nov 2015 21:49:37 +0600 Subject: [PATCH] [pluralsight] Improve login detection --- youtube_dl/extractor/pluralsight.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/youtube_dl/extractor/pluralsight.py b/youtube_dl/extractor/pluralsight.py index de7dc739b..7693282a5 100644 --- a/youtube_dl/extractor/pluralsight.py +++ b/youtube_dl/extractor/pluralsight.py @@ -84,6 +84,9 @@ class PluralsightIE(PluralsightBaseIE): if error: raise ExtractorError('Unable to login: %s' % error, expected=True) + if all(p not in response for p in ('__INITIAL_STATE__', '"currentUser"')): + raise ExtractorError('Unable to log in') + def _real_extract(self, url): qs = compat_urlparse.parse_qs(compat_urlparse.urlparse(url).query) -- 2.22.2