From 29f7c58aafb25a094e267a8a3fb355e102e42792 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Fri, 1 Jan 2021 17:56:37 +0530 Subject: Update to ytdl-2021.01.03 --- youtube_dlc/extractor/mitele.py | 48 ++++++----------------------------------- 1 file changed, 7 insertions(+), 41 deletions(-) (limited to 'youtube_dlc/extractor/mitele.py') diff --git a/youtube_dlc/extractor/mitele.py b/youtube_dlc/extractor/mitele.py index 7f5718e21..0b240d27f 100644 --- a/youtube_dlc/extractor/mitele.py +++ b/youtube_dlc/extractor/mitele.py @@ -2,15 +2,14 @@ from __future__ import unicode_literals import json -from .common import InfoExtractor +from .telecinco import TelecincoIE from ..utils import ( int_or_none, parse_iso8601, - smuggle_url, ) -class MiTeleIE(InfoExtractor): +class MiTeleIE(TelecincoIE): IE_DESC = 'mitele.es' _VALID_URL = r'https?://(?:www\.)?mitele\.es/(?:[^/]+/)+(?P[^/]+)/player' @@ -53,7 +52,7 @@ class MiTeleIE(InfoExtractor): }, 'params': { 'skip_download': True, - } + }, }, { 'url': 'http://www.mitele.es/series-online/la-que-se-avecina/57aac5c1c915da951a8b45ed/player', 'only_matching': True, @@ -69,13 +68,11 @@ class MiTeleIE(InfoExtractor): r'window\.\$REACTBASE_STATE\.prePlayer_mtweb\s*=\s*({.+})', webpage, 'Pre Player'), display_id)['prePlayer'] title = pre_player['title'] - video = pre_player['video'] - video_id = video['dataMediaId'] + video_info = self._parse_content(pre_player['video'], url) content = pre_player.get('content') or {} info = content.get('info') or {} - info = { - 'id': video_id, + video_info.update({ 'title': title, 'description': info.get('synopsis'), 'series': content.get('title'), @@ -83,38 +80,7 @@ class MiTeleIE(InfoExtractor): 'episode': content.get('subtitle'), 'episode_number': int_or_none(info.get('episode_number')), 'duration': int_or_none(info.get('duration')), - 'thumbnail': video.get('dataPoster'), 'age_limit': int_or_none(info.get('rating')), 'timestamp': parse_iso8601(pre_player.get('publishedTime')), - } - - if video.get('dataCmsId') == 'ooyala': - info.update({ - '_type': 'url_transparent', - # for some reason only HLS is supported - 'url': smuggle_url('ooyala:' + video_id, {'supportedformats': 'm3u8,dash'}), - }) - else: - config = self._download_json( - video['dataConfig'], video_id, 'Downloading config JSON') - services = config['services'] - gbx = self._download_json( - services['gbx'], video_id, 'Downloading gbx JSON') - caronte = self._download_json( - services['caronte'], video_id, 'Downloading caronte JSON') - cerbero = self._download_json( - caronte['cerbero'], video_id, 'Downloading cerbero JSON', - headers={ - 'Content-Type': 'application/json;charset=UTF-8', - 'Origin': 'https://www.mitele.es' - }, - data=json.dumps({ - 'bbx': caronte['bbx'], - 'gbx': gbx['gbx'] - }).encode('utf-8')) - formats = self._extract_m3u8_formats( - caronte['dls'][0]['stream'], video_id, 'mp4', 'm3u8_native', m3u8_id='hls', - query=dict([cerbero['tokens']['1']['cdn'].split('=', 1)])) - info['formats'] = formats - - return info + }) + return video_info -- cgit v1.2.3 From c76eb41bb9e7e0a106ce44f4afcf74b0c00a3fb2 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Thu, 7 Jan 2021 12:11:05 +0530 Subject: Preparing for release --- youtube_dlc/extractor/mitele.py | 1 - 1 file changed, 1 deletion(-) (limited to 'youtube_dlc/extractor/mitele.py') diff --git a/youtube_dlc/extractor/mitele.py b/youtube_dlc/extractor/mitele.py index 0b240d27f..b5937233b 100644 --- a/youtube_dlc/extractor/mitele.py +++ b/youtube_dlc/extractor/mitele.py @@ -1,6 +1,5 @@ # coding: utf-8 from __future__ import unicode_literals -import json from .telecinco import TelecincoIE from ..utils import ( -- cgit v1.2.3