1 from .telecinco
import TelecincoIE
8 class MiTeleIE(TelecincoIE
): # XXX: Do not subclass from concrete IE
10 _VALID_URL
= r
'https?://(?:www\.)?mitele\.es/(?:[^/]+/)+(?P<id>[^/]+)/player'
13 'url': 'http://www.mitele.es/programas-tv/diario-de/57b0dfb9c715da65618b4afa/player',
15 'id': 'FhYW1iNTE6J6H7NkQRIEzfne6t2quqPg',
17 'title': 'Diario de La redacción Programa 144',
18 'description': 'md5:07c35a7b11abb05876a6a79185b58d27',
19 'series': 'Diario de',
20 'season': 'Season 14',
22 'episode': 'Tor, la web invisible',
24 'thumbnail': r
're:(?i)^https?://.*\.jpg$',
27 'timestamp': 1471209401,
28 'upload_date': '20160814',
32 'url': 'http://www.mitele.es/programas-tv/cuarto-milenio/57b0de3dc915da14058b4876/player',
34 'id': 'oyNG1iNTE6TAPP-JmCjbwfwJqqMMX3Vq',
36 'title': 'Cuarto Milenio Temporada 6 Programa 226',
37 'description': 'md5:5ff132013f0cd968ffbf1f5f3538a65f',
38 'series': 'Cuarto Milenio',
41 'episode': 'Episode 24',
43 'thumbnail': r
're:(?i)^https?://.*\.jpg$',
46 'timestamp': 1471209021,
47 'upload_date': '20160814',
50 'skip_download': True,
53 'url': 'http://www.mitele.es/series-online/la-que-se-avecina/57aac5c1c915da951a8b45ed/player',
54 'only_matching': True,
56 'url': 'https://www.mitele.es/programas-tv/diario-de/la-redaccion/programa-144-40_1006364575251/player/',
57 'only_matching': True,
60 def _real_extract(self
, url
):
61 display_id
= self
._match
_id
(url
)
62 webpage
= self
._download
_webpage
(url
, display_id
)
63 pre_player
= self
._parse
_json
(self
._search
_regex
(
64 r
'window\.\$REACTBASE_STATE\.prePlayer_mtweb\s*=\s*({.+})',
65 webpage
, 'Pre Player'), display_id
)['prePlayer']
66 title
= pre_player
['title']
67 video_info
= self
._parse
_content
(pre_player
['video'], url
)
68 content
= pre_player
.get('content') or {}
69 info
= content
.get('info') or {}
73 'description': info
.get('synopsis'),
74 'series': content
.get('title'),
75 'season_number': int_or_none(info
.get('season_number')),
76 'episode': content
.get('subtitle'),
77 'episode_number': int_or_none(info
.get('episode_number')),
78 'duration': int_or_none(info
.get('duration')),
79 'age_limit': int_or_none(info
.get('rating')),
80 'timestamp': parse_iso8601(pre_player
.get('publishedTime')),