[pluralsight] Detect blocked account error message (#12070)

This commit is contained in:
Sergey M․ 2017-02-10 22:48:11 +07:00
parent 9510709575
commit 9dd5408c99
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -92,6 +92,10 @@ def _login(self):
raise ExtractorError('Unable to login: %s' % error, expected=True) raise ExtractorError('Unable to login: %s' % error, expected=True)
if all(p not in response for p in ('__INITIAL_STATE__', '"currentUser"')): if all(p not in response for p in ('__INITIAL_STATE__', '"currentUser"')):
BLOCKED = 'Your account has been blocked due to suspicious activity'
if BLOCKED in response:
raise ExtractorError(
'Unable to login: %s' % BLOCKED, expected=True)
raise ExtractorError('Unable to log in') raise ExtractorError('Unable to log in')
def _get_subtitles(self, author, clip_id, lang, name, duration, video_id): def _get_subtitles(self, author, clip_id, lang, name, duration, video_id):