Version 0.7.15
This commit is contained in:
1 parent
3a5576b350
commit
ffc0e81556
5 files changed
+23
-3
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.movistarplus"
|
||||
name="Movistar+"
|
||||
version="0.7.14"
|
||||
version="0.7.15"
|
||||
provider-name="Paco8">
|
||||
<requires>
|
||||
<!--- <import addon="xbmc.python" version="2.25.0"/> -->
|
||||
|
||||
@@ -87,6 +87,7 @@ endpoints = {
|
||||
"renovacion_hztoken": "https://clientservices.dof6.com/movistarplus/{deviceType}/mediaPlayers/{DEVICEID}/hz-token",
|
||||
"keepAliveStream": "https://alkasvaspub.imagenio.telefonica.net/asvas/ccs/{PID}/{deviceCode}/{PLAYREADYID}/Session/{SessionID}",
|
||||
"renovacion_ssptoken": "https://clientservices.dof6.com/movistarplus/{deviceType}/accounts/{ACCOUNTNUMBER}/ssp-token?mediaPlayerId={DEVICEID}",
|
||||
"renovacion_cdntoken2": "https://lite.dof6.com/tcdnidserver/{ACCOUNTNUMBER}/devices/webplayer/cdn/token/refresh",
|
||||
"config": "https://ottcache.dof6.com/movistarplus/{origin}/webplayer/{profile}/configuration/config?format=json&uisegment={uisegment}",
|
||||
"registro": "https://www.movistar.es/particulares/ver-tv/contenidos/yomvi?origen=activar",
|
||||
"consulta_producto": "https://clientservices.dof6.com/movistarplus/upselling/{deviceType}/{PLAYREADYID}/contents/{contents}/{contentId}/subscription?mdrm={mdrm}",
|
||||
|
||||
@@ -394,6 +394,13 @@ class Movistar(object):
|
||||
content = response.content.decode('utf-8')
|
||||
return content
|
||||
|
||||
def get_cdntoken(self):
|
||||
headers = self.net.headers.copy()
|
||||
headers['Authorization'] = 'Bearer ' + self.account['access_token']
|
||||
url = self.endpoints['renovacion_cdntoken2'].format(ACCOUNTNUMBER=self.account['id'])
|
||||
data = self.net.post_data(url, None, headers)
|
||||
return data.get('access_token')
|
||||
|
||||
def get_profiles(self):
|
||||
headers = self.net.headers.copy()
|
||||
headers['X-HZId'] = self.account['session_token']
|
||||
|
||||
@@ -104,6 +104,12 @@ def play(params):
|
||||
headers += '&Origin=https://ver.movistarplus.es&Connection=keep-alive'
|
||||
headers += '&Host=wv-ottlic-f3.imagenio.telefonica.net'
|
||||
|
||||
manifest_headers = 'User-Agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0'
|
||||
if stype == 'tv':
|
||||
cdn_token = m.get_cdntoken()
|
||||
LOG('cdn_token: {}'.format(cdn_token))
|
||||
manifest_headers += '&x-tcdn-token=' + cdn_token
|
||||
|
||||
license_url = 'https://wv-ottlic-f3.imagenio.telefonica.net/TFAESP/wvls/contentlicenseservice/v1/licenses'
|
||||
certificate = (
|
||||
'CsECCAMSEBcFuRfMEgSGiwYzOi93KowYgrSCkgUijgIwggEKAoIBAQCZ7Vs7Mn2rXiTvw7YqlbWY'
|
||||
@@ -135,7 +141,8 @@ def play(params):
|
||||
play_item.setProperty('inputstream.adaptive.license_key', license_url)
|
||||
else:
|
||||
play_item.setProperty('inputstream.adaptive.license_key', '{}|{}&nv-authorizations={}|R{{SSM}}|'.format(license_url, headers, token))
|
||||
play_item.setProperty('inputstream.adaptive.stream_headers', 'User-Agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0')
|
||||
play_item.setProperty('inputstream.adaptive.stream_headers', manifest_headers)
|
||||
play_item.setProperty('inputstream.adaptive.manifest_headers', manifest_headers) # Kodi 21
|
||||
play_item.setProperty('inputstream.adaptive.server_certificate', certificate)
|
||||
#play_item.setProperty('inputstream.adaptive.license_flags', 'persistent_storage')
|
||||
#play_item.setProperty('inputstream.adaptive.license_flags', 'force_secure_decoder')
|
||||
|
||||
@@ -88,7 +88,12 @@ class RequestHandler(BaseHTTPRequestHandler):
|
||||
pos = path.find('=')
|
||||
url = path[pos+1:]
|
||||
LOG('url: {}'.format(url))
|
||||
response = session.get(url, allow_redirects=True)
|
||||
#LOG('request headers: {}'.format(self.headers))
|
||||
additional_headers = {}
|
||||
if 'x-tcdn-token' in self.headers:
|
||||
additional_headers['x-tcdn-token'] = self.headers['x-tcdn-token']
|
||||
#LOG('additional_headers: {}'.format(additional_headers))
|
||||
response = session.get(url, allow_redirects=True, headers=additional_headers)
|
||||
LOG('headers: {}'.format(response.headers))
|
||||
baseurl = os.path.dirname(response.url)
|
||||
LOG('baseurl: {}'.format(baseurl))
|
||||
|
||||
Reference in new issue
Block a user