mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-06-16 16:34:09 +00:00
[ie/adobepass] Add Fubo MSO (#13131)
Closes #8287 Authored by: maxbin123
This commit is contained in:
parent
711c5d5d09
commit
eee90acc47
@ -11,6 +11,7 @@ from ..networking.exceptions import HTTPError
|
|||||||
from ..utils import (
|
from ..utils import (
|
||||||
NO_DEFAULT,
|
NO_DEFAULT,
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
|
parse_qs,
|
||||||
unescapeHTML,
|
unescapeHTML,
|
||||||
unified_timestamp,
|
unified_timestamp,
|
||||||
urlencode_postdata,
|
urlencode_postdata,
|
||||||
@ -79,6 +80,11 @@ MSO_INFO = {
|
|||||||
'password_field': 'IDToken2',
|
'password_field': 'IDToken2',
|
||||||
'login_hostname': 'ssoauth.verizon.com',
|
'login_hostname': 'ssoauth.verizon.com',
|
||||||
},
|
},
|
||||||
|
'Fubo': {
|
||||||
|
'name': 'Fubo',
|
||||||
|
'username_field': 'username',
|
||||||
|
'password_field': 'password',
|
||||||
|
},
|
||||||
'Cablevision': {
|
'Cablevision': {
|
||||||
'name': 'Optimum/Cablevision',
|
'name': 'Optimum/Cablevision',
|
||||||
'username_field': 'j_username',
|
'username_field': 'j_username',
|
||||||
@ -1761,6 +1767,27 @@ class AdobePassIE(InfoExtractor): # XXX: Conventionally, base classes should en
|
|||||||
query=hidden_data)
|
query=hidden_data)
|
||||||
|
|
||||||
post_form(mvpd_confirm_page_res, 'Confirming Login')
|
post_form(mvpd_confirm_page_res, 'Confirming Login')
|
||||||
|
elif mso_id == 'Fubo':
|
||||||
|
_, urlh = provider_redirect_page_res
|
||||||
|
|
||||||
|
fubo_response = self._download_json(
|
||||||
|
'https://api.fubo.tv/partners/tve/connect', video_id,
|
||||||
|
'Authenticating with Fubo', 'Unable to authenticate with Fubo',
|
||||||
|
query=parse_qs(urlh.url), data=json.dumps({
|
||||||
|
'username': username,
|
||||||
|
'password': password,
|
||||||
|
}).encode(), headers={
|
||||||
|
'Accept': 'application/json',
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
})
|
||||||
|
|
||||||
|
self._request_webpage(
|
||||||
|
'https://sp.auth.adobe.com/adobe-services/oauth2', video_id,
|
||||||
|
'Authenticating with Adobe', 'Failed to authenticate with Adobe',
|
||||||
|
query={
|
||||||
|
'code': fubo_response['code'],
|
||||||
|
'state': fubo_response['state'],
|
||||||
|
})
|
||||||
else:
|
else:
|
||||||
# Some providers (e.g. DIRECTV NOW) have another meta refresh
|
# Some providers (e.g. DIRECTV NOW) have another meta refresh
|
||||||
# based redirect that should be followed.
|
# based redirect that should be followed.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user