[pluralsight] Detect agreement request (#14913)

pull/8/head
Sergey M․ 2017-12-05 22:34:56 +07:00
rodzic d4f05d4731
commit c94427dd60
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 2C393E0F18A9236D
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -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):