0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-04 23:35:04 +00:00

[adobepass] PEP 8

This commit is contained in:
Sergey M․ 2016-10-21 04:38:14 +07:00
parent f8ae2c7f30
commit 859447a28d
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -1376,19 +1376,23 @@ def raise_mvpd_required():
provider_redirect_page, urlh = provider_redirect_page_res provider_redirect_page, urlh = provider_redirect_page_res
# Check for Comcast auto login # Check for Comcast auto login
if 'automatically signing you in' in provider_redirect_page: if 'automatically signing you in' in provider_redirect_page:
oauth_redirect_url = self._html_search_regex(r'window\.location\s*=\s*[\'"]([^\'"]+)', oauth_redirect_url = self._html_search_regex(
r'window\.location\s*=\s*[\'"]([^\'"]+)',
provider_redirect_page, 'oauth redirect') provider_redirect_page, 'oauth redirect')
# Just need to process the request. No useful data comes back # Just need to process the request. No useful data comes back
self._download_webpage(oauth_redirect_url, video_id, 'Confirming auto login') 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:
# already have the form, just fill it # already have the form, just fill it
provider_login_page_res = provider_redirect_page_res provider_login_page_res = provider_redirect_page_res
elif 'http-equiv="refresh"' in provider_redirect_page: elif 'http-equiv="refresh"' in provider_redirect_page:
# redirects to the login page # redirects to the login page
oauth_redirect_url = self._html_search_regex(r'content="0;\s*url=([^\'"]+)', oauth_redirect_url = self._html_search_regex(
r'content="0;\s*url=([^\'"]+)',
provider_redirect_page, 'meta refresh redirect') provider_redirect_page, 'meta refresh redirect')
provider_login_page_res = self._download_webpage_handle(oauth_redirect_url, provider_login_page_res = self._download_webpage_handle(
oauth_redirect_url,
video_id, 'Downloading Provider Login Page') video_id, 'Downloading Provider Login Page')
else: else:
provider_login_page_res = post_form( provider_login_page_res = post_form(