[adobepass] Detect and output error on authz token extraction (#12472)
authorSergey M․ <dstftw@gmail.com>
Fri, 17 Mar 2017 23:19:11 +0000 (06:19 +0700)
committerSergey M․ <dstftw@gmail.com>
Fri, 17 Mar 2017 23:21:31 +0000 (06:21 +0700)
youtube_dl/extractor/adobepass.py

index d4816abf5f4959624f66122c499eebd31a9c4680..1b2d364cab452da835d7ba8cc78325825c0fcf20 100644 (file)
@@ -1458,6 +1458,8 @@ class AdobePassIE(InfoExtractor):
                     self._downloader.cache.store(self._MVPD_CACHE, requestor_id, {})
                     count += 1
                     continue
+                if '<error' in authorize:
+                    raise ExtractorError(xml_text(authorize, 'details'), expected=True)
                 authz_token = unescapeHTML(xml_text(authorize, 'authzToken'))
                 requestor_info[guid] = authz_token
                 self._downloader.cache.store(self._MVPD_CACHE, requestor_id, requestor_info)