mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-01-07 17:16:08 +00:00
This commit is contained in:
parent
f86b299d0e
commit
4c7a4dbc4d
|
@ -1,15 +1,14 @@
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .telecinco import TelecincoIE
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
int_or_none,
|
int_or_none,
|
||||||
parse_iso8601,
|
parse_iso8601,
|
||||||
smuggle_url,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class MiTeleIE(InfoExtractor):
|
class MiTeleIE(TelecincoIE):
|
||||||
IE_DESC = 'mitele.es'
|
IE_DESC = 'mitele.es'
|
||||||
_VALID_URL = r'https?://(?:www\.)?mitele\.es/(?:[^/]+/)+(?P<id>[^/]+)/player'
|
_VALID_URL = r'https?://(?:www\.)?mitele\.es/(?:[^/]+/)+(?P<id>[^/]+)/player'
|
||||||
|
|
||||||
|
@ -31,7 +30,6 @@ class MiTeleIE(InfoExtractor):
|
||||||
'timestamp': 1471209401,
|
'timestamp': 1471209401,
|
||||||
'upload_date': '20160814',
|
'upload_date': '20160814',
|
||||||
},
|
},
|
||||||
'add_ie': ['Ooyala'],
|
|
||||||
}, {
|
}, {
|
||||||
# no explicit title
|
# no explicit title
|
||||||
'url': 'http://www.mitele.es/programas-tv/cuarto-milenio/57b0de3dc915da14058b4876/player',
|
'url': 'http://www.mitele.es/programas-tv/cuarto-milenio/57b0de3dc915da14058b4876/player',
|
||||||
|
@ -54,7 +52,6 @@ class MiTeleIE(InfoExtractor):
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
'add_ie': ['Ooyala'],
|
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://www.mitele.es/series-online/la-que-se-avecina/57aac5c1c915da951a8b45ed/player',
|
'url': 'http://www.mitele.es/series-online/la-que-se-avecina/57aac5c1c915da951a8b45ed/player',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
@ -70,16 +67,11 @@ class MiTeleIE(InfoExtractor):
|
||||||
r'window\.\$REACTBASE_STATE\.prePlayer_mtweb\s*=\s*({.+})',
|
r'window\.\$REACTBASE_STATE\.prePlayer_mtweb\s*=\s*({.+})',
|
||||||
webpage, 'Pre Player'), display_id)['prePlayer']
|
webpage, 'Pre Player'), display_id)['prePlayer']
|
||||||
title = pre_player['title']
|
title = pre_player['title']
|
||||||
video = pre_player['video']
|
video_info = self._parse_content(pre_player['video'], url)
|
||||||
video_id = video['dataMediaId']
|
|
||||||
content = pre_player.get('content') or {}
|
content = pre_player.get('content') or {}
|
||||||
info = content.get('info') or {}
|
info = content.get('info') or {}
|
||||||
|
|
||||||
return {
|
video_info.update({
|
||||||
'_type': 'url_transparent',
|
|
||||||
# for some reason only HLS is supported
|
|
||||||
'url': smuggle_url('ooyala:' + video_id, {'supportedformats': 'm3u8,dash'}),
|
|
||||||
'id': video_id,
|
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': info.get('synopsis'),
|
'description': info.get('synopsis'),
|
||||||
'series': content.get('title'),
|
'series': content.get('title'),
|
||||||
|
@ -87,7 +79,7 @@ class MiTeleIE(InfoExtractor):
|
||||||
'episode': content.get('subtitle'),
|
'episode': content.get('subtitle'),
|
||||||
'episode_number': int_or_none(info.get('episode_number')),
|
'episode_number': int_or_none(info.get('episode_number')),
|
||||||
'duration': int_or_none(info.get('duration')),
|
'duration': int_or_none(info.get('duration')),
|
||||||
'thumbnail': video.get('dataPoster'),
|
|
||||||
'age_limit': int_or_none(info.get('rating')),
|
'age_limit': int_or_none(info.get('rating')),
|
||||||
'timestamp': parse_iso8601(pre_player.get('publishedTime')),
|
'timestamp': parse_iso8601(pre_player.get('publishedTime')),
|
||||||
}
|
})
|
||||||
|
return video_info
|
||||||
|
|
Loading…
Reference in a new issue