Browse Source

[pluralsight] Improve login detection

Sergey M․ 9 năm trước cách đây
mục cha
commit
7e508ff2cf
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      youtube_dl/extractor/pluralsight.py

+ 3 - 0
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)