Added Comcast_SSO fix

This fix had been proposed on yt-dl for a lengthy period of time but was never merged. It has been thoroughly tested but a large section of the community.
This commit is contained in:
Dan Walker 2020-10-30 08:31:34 -07:00
parent 4932ba4aec
commit 3086aa194f

View file

@ -1438,6 +1438,13 @@ def extract_redirect_url(html, url=None, fatal=False):
provider_redirect_page, 'oauth redirect') provider_redirect_page, 'oauth redirect')
self._download_webpage( self._download_webpage(
oauth_redirect_url, video_id, 'Confirming auto login') oauth_redirect_url, video_id, 'Confirming auto login')
elif 'automatically signed in with' in provider_redirect_page:
# Seems like comcast is rolling up new way of automatically signing customers
oauth_redirect_url = self._html_search_regex(
r'continue:\s*"(https://oauth.xfinity.com/oauth/authorize\?.+)"', provider_redirect_page,
'oauth redirect (signed)')
# Just need to process the request. No useful data comes back
self._download_webpage(oauth_redirect_url, video_id, 'Confirming auto login')
else: else:
if '<form name="signin"' in provider_redirect_page: if '<form name="signin"' in provider_redirect_page:
provider_login_page_res = provider_redirect_page_res provider_login_page_res = provider_redirect_page_res