|
|
|
@ -1431,7 +1431,7 @@ class AdobePassIE(InfoExtractor):
|
|
|
|
|
guid = xml_text(resource, 'guid') if '<' in resource else resource
|
|
|
|
|
count = 0
|
|
|
|
|
while count < 2:
|
|
|
|
|
requestor_info = self._downloader.cache.load(self._MVPD_CACHE, requestor_id) or {}
|
|
|
|
|
requestor_info = self.cache.load(self._MVPD_CACHE, requestor_id) or {}
|
|
|
|
|
authn_token = requestor_info.get('authn_token')
|
|
|
|
|
if authn_token and is_expired(authn_token, 'simpleTokenExpires'):
|
|
|
|
|
authn_token = None
|
|
|
|
@ -1726,12 +1726,12 @@ class AdobePassIE(InfoExtractor):
|
|
|
|
|
raise_mvpd_required()
|
|
|
|
|
raise
|
|
|
|
|
if '<pendingLogout' in session:
|
|
|
|
|
self._downloader.cache.store(self._MVPD_CACHE, requestor_id, {})
|
|
|
|
|
self.cache.store(self._MVPD_CACHE, requestor_id, {})
|
|
|
|
|
count += 1
|
|
|
|
|
continue
|
|
|
|
|
authn_token = unescapeHTML(xml_text(session, 'authnToken'))
|
|
|
|
|
requestor_info['authn_token'] = authn_token
|
|
|
|
|
self._downloader.cache.store(self._MVPD_CACHE, requestor_id, requestor_info)
|
|
|
|
|
self.cache.store(self._MVPD_CACHE, requestor_id, requestor_info)
|
|
|
|
|
|
|
|
|
|
authz_token = requestor_info.get(guid)
|
|
|
|
|
if authz_token and is_expired(authz_token, 'simpleTokenTTL'):
|
|
|
|
@ -1747,14 +1747,14 @@ class AdobePassIE(InfoExtractor):
|
|
|
|
|
'userMeta': '1',
|
|
|
|
|
}), headers=mvpd_headers)
|
|
|
|
|
if '<pendingLogout' in authorize:
|
|
|
|
|
self._downloader.cache.store(self._MVPD_CACHE, requestor_id, {})
|
|
|
|
|
self.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)
|
|
|
|
|
self.cache.store(self._MVPD_CACHE, requestor_id, requestor_info)
|
|
|
|
|
|
|
|
|
|
mvpd_headers.update({
|
|
|
|
|
'ap_19': xml_text(authn_token, 'simpleSamlNameID'),
|
|
|
|
@ -1770,7 +1770,7 @@ class AdobePassIE(InfoExtractor):
|
|
|
|
|
'hashed_guid': 'false',
|
|
|
|
|
}), headers=mvpd_headers)
|
|
|
|
|
if '<pendingLogout' in short_authorize:
|
|
|
|
|
self._downloader.cache.store(self._MVPD_CACHE, requestor_id, {})
|
|
|
|
|
self.cache.store(self._MVPD_CACHE, requestor_id, {})
|
|
|
|
|
count += 1
|
|
|
|
|
continue
|
|
|
|
|
return short_authorize
|
|
|
|
|