aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan@users.noreply.github.com>2021-01-11 14:35:17 +0530
committerGitHub <noreply@github.com>2021-01-11 14:35:17 +0530
commit5cc6ceb73b60f437c8d297a0640c8aab2a4039f3 (patch)
tree3c2efc4e9dcab8a5b552899e23746528afece5dc
parent6d07ec81d3475343330df55b544640555dcaacf1 (diff)
downloadhypervideo-pre-5cc6ceb73b60f437c8d297a0640c8aab2a4039f3.tar.lz
hypervideo-pre-5cc6ceb73b60f437c8d297a0640c8aab2a4039f3.tar.xz
hypervideo-pre-5cc6ceb73b60f437c8d297a0640c8aab2a4039f3.zip
#13 [adobepass] Added Philo MSO (https://github.com/ytdl-org/youtube-dl/pull/17821)
Authored-by: Aniruddh Joshi <aniruddh@ebincoweb.com>
-rw-r--r--youtube_dlc/extractor/adobepass.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/youtube_dlc/extractor/adobepass.py b/youtube_dlc/extractor/adobepass.py
index 649f9940f..79a532858 100644
--- a/youtube_dlc/extractor/adobepass.py
+++ b/youtube_dlc/extractor/adobepass.py
@@ -9,6 +9,7 @@ from .common import InfoExtractor
from ..compat import (
compat_kwargs,
compat_urlparse,
+ compat_getpass
)
from ..utils import (
unescapeHTML,
@@ -60,6 +61,10 @@ MSO_INFO = {
'username_field': 'IDToken1',
'password_field': 'IDToken2',
},
+ 'Philo': {
+ 'name': 'Philo',
+ 'username_field': 'ident'
+ },
'Verizon': {
'name': 'Verizon FiOS',
'username_field': 'IDToken1',
@@ -1467,6 +1472,22 @@ class AdobePassIE(InfoExtractor):
mvpd_confirm_page, urlh = mvpd_confirm_page_res
if '<button class="submit" value="Resume">Resume</button>' in mvpd_confirm_page:
post_form(mvpd_confirm_page_res, 'Confirming Login')
+ elif mso_id == 'Philo':
+ # Philo has very unique authentication method
+ self._download_webpage(
+ 'https://idp.philo.com/auth/init/login_code', video_id, 'Requesting auth code', data=urlencode_postdata({
+ 'ident': username,
+ 'device': 'web',
+ 'send_confirm_link': False,
+ 'send_token': True
+ }))
+ philo_code = compat_getpass('Type auth code you have received [Return]: ')
+ self._download_webpage(
+ 'https://idp.philo.com/auth/update/login_code', video_id, 'Submitting token', data=urlencode_postdata({
+ 'token': philo_code
+ }))
+ mvpd_confirm_page_res = self._download_webpage_handle('https://idp.philo.com/idp/submit', video_id, 'Confirming Philo Login')
+ post_form(mvpd_confirm_page_res, 'Confirming Login')
elif mso_id == 'Verizon':
# In general, if you're connecting from a Verizon-assigned IP,
# you will not actually pass your credentials.