From 325ee6e7f19f6e367e69cf2399cb2ba56240f48d Mon Sep 17 00:00:00 2001 From: Sipherdrakon <64430430+Sipherdrakon@users.noreply.github.com> Date: Thu, 29 May 2025 00:33:38 -0400 Subject: [PATCH 1/2] Update Philo MSO Figured now that most of the stuff philo can be used as a TVE provider for has been fixed, should probably get the MSO back up and running. :-P --- yt_dlp/extractor/adobepass.py | 38 +++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/yt_dlp/extractor/adobepass.py b/yt_dlp/extractor/adobepass.py index 91c40b32ef..8763520f96 100644 --- a/yt_dlp/extractor/adobepass.py +++ b/yt_dlp/extractor/adobepass.py @@ -1574,18 +1574,34 @@ class AdobePassIE(InfoExtractor): # XXX: Conventionally, base classes should en 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_ident_payload = { + 'ident': username, + 'device': 'web', + 'send_confirm_link': False, + 'send_token': True, + 'device_ident': f'web-{uuid.uuid4().hex}', + 'include_login_link': True, + } + + self._download_json_handle( + 'https://idp.philo.com/auth/init/login_code', video_id, + note='Requesting Philo auth code', data=json.dumps(philo_ident_payload).encode('utf-8'), + headers={ + 'Content-Type': 'application/json', + 'Accept': 'application/json', + }) + philo_code = getpass.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, - })) + + update_code_payload = {'token': philo_code} + self._download_json_handle( + 'https://idp.philo.com/auth/update/login_code', video_id, + note='Submitting token', data=json.dumps(update_code_payload).encode('utf-8'), + headers={ + 'Content-Type': 'application/json', + 'Accept': 'application/json', + }) + 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': From ff325ec76c47ef3a8b8f09c2216866d5a241883d Mon Sep 17 00:00:00 2001 From: Sipherdrakon <64430430+Sipherdrakon@users.noreply.github.com> Date: Thu, 29 May 2025 00:45:41 -0400 Subject: [PATCH 2/2] Update adobepass.py --- yt_dlp/extractor/adobepass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/extractor/adobepass.py b/yt_dlp/extractor/adobepass.py index 8763520f96..6b4c2621ee 100644 --- a/yt_dlp/extractor/adobepass.py +++ b/yt_dlp/extractor/adobepass.py @@ -1597,7 +1597,7 @@ class AdobePassIE(InfoExtractor): # XXX: Conventionally, base classes should en self._download_json_handle( 'https://idp.philo.com/auth/update/login_code', video_id, note='Submitting token', data=json.dumps(update_code_payload).encode('utf-8'), - headers={ + headers={ 'Content-Type': 'application/json', 'Accept': 'application/json', })