[adobepass] Fix Suddenlink MSO (#3148)

Authored by: CplPwnies
This commit is contained in:
CplPwnies 2022-03-22 16:09:38 -05:00 committed by GitHub
parent 84842aee2b
commit 1f1df1251e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1650,13 +1650,19 @@ def extract_redirect_url(html, url=None, fatal=False):
hidden_data = self._hidden_inputs(first_bookend_page) hidden_data = self._hidden_inputs(first_bookend_page)
hidden_data['history_val'] = 1 hidden_data['history_val'] = 1
provider_login_redirect_page = self._download_webpage( provider_login_redirect_page_res = self._download_webpage_handle(
urlh.geturl(), video_id, 'Sending First Bookend', urlh.geturl(), video_id, 'Sending First Bookend',
query=hidden_data) query=hidden_data)
provider_login_redirect_page, urlh = provider_login_redirect_page_res
# Some website partners seem to not have the extra ajaxurl redirect step, so we check if we already
# have the login prompt or not
if 'id="password" type="password" name="password"' in provider_login_redirect_page:
provider_login_page_res = provider_login_redirect_page_res
else:
provider_tryauth_url = self._html_search_regex( provider_tryauth_url = self._html_search_regex(
r'url:\s*[\'"]([^\'"]+)', provider_login_redirect_page, 'ajaxurl') r'url:\s*[\'"]([^\'"]+)', provider_login_redirect_page, 'ajaxurl')
provider_tryauth_page = self._download_webpage( provider_tryauth_page = self._download_webpage(
provider_tryauth_url, video_id, 'Submitting TryAuth', provider_tryauth_url, video_id, 'Submitting TryAuth',
query=hidden_data) query=hidden_data)