]>
Commit | Line | Data |
---|---|---|
5f6a1245 | 1 | # coding: utf-8 |
ad5f53ac JMF |
2 | from __future__ import unicode_literals |
3 | ||
47335a0e | 4 | from .mitele import MiTeleBaseIE |
ad5f53ac JMF |
5 | |
6 | ||
47335a0e | 7 | class TelecincoIE(MiTeleBaseIE): |
4647fd89 | 8 | IE_DESC = 'telecinco.es, cuatro.com and mediaset.es' |
92519402 | 9 | _VALID_URL = r'https?://(?:www\.)?(?:telecinco\.es|cuatro\.com|mediaset\.es)/(?:[^/]+/)+(?P<id>.+?)\.html' |
ad5f53ac | 10 | |
c10ea454 | 11 | _TESTS = [{ |
ad5f53ac | 12 | 'url': 'http://www.telecinco.es/robinfood/temporada-01/t01xp14/Bacalao-cocochas-pil-pil_0_1876350223.html', |
47335a0e | 13 | 'md5': '8d7b2d5f699ee2709d992a63d5cd1712', |
ad5f53ac | 14 | 'info_dict': { |
47335a0e | 15 | 'id': 'JEA5ijCnF6p5W08A1rNKn7', |
ad5f53ac | 16 | 'ext': 'mp4', |
47335a0e RA |
17 | 'title': 'Bacalao con kokotxas al pil-pil', |
18 | 'description': 'md5:1382dacd32dd4592d478cbdca458e5bb', | |
ad5f53ac JMF |
19 | 'duration': 662, |
20 | }, | |
d5e7657f S |
21 | }, { |
22 | 'url': 'http://www.cuatro.com/deportes/futbol/barcelona/Leo_Messi-Champions-Roma_2_2052780128.html', | |
47335a0e | 23 | 'md5': '284393e5387b3b947b77c613ef04749a', |
d5e7657f | 24 | 'info_dict': { |
47335a0e | 25 | 'id': 'jn24Od1zGLG4XUZcnUnZB6', |
d5e7657f | 26 | 'ext': 'mp4', |
47335a0e RA |
27 | 'title': '¿Quién es este ex futbolista con el que hablan Leo Messi y Luis Suárez?', |
28 | 'description': 'md5:a62ecb5f1934fc787107d7b9a2262805', | |
d5e7657f S |
29 | 'duration': 79, |
30 | }, | |
d492dad8 S |
31 | }, { |
32 | 'url': 'http://www.mediaset.es/12meses/campanas/doylacara/conlatratanohaytrato/Ayudame-dar-cara-trata-trato_2_1986630220.html', | |
47335a0e | 33 | 'md5': '749afab6ea5a136a8806855166ae46a2', |
d492dad8 | 34 | 'info_dict': { |
47335a0e | 35 | 'id': 'aywerkD2Sv1vGNqq9b85Q2', |
d492dad8 S |
36 | 'ext': 'mp4', |
37 | 'title': '#DOYLACARA. Con la trata no hay trato', | |
47335a0e | 38 | 'description': 'md5:2771356ff7bfad9179c5f5cd954f1477', |
d492dad8 S |
39 | 'duration': 50, |
40 | }, | |
c10ea454 JMF |
41 | }, { |
42 | 'url': 'http://www.telecinco.es/informativos/nacional/Pablo_Iglesias-Informativos_Telecinco-entrevista-Pedro_Piqueras_2_1945155182.html', | |
43 | 'only_matching': True, | |
34a4cd0a S |
44 | }, { |
45 | 'url': 'http://www.telecinco.es/espanasinirmaslejos/Espana-gran-destino-turistico_2_1240605043.html', | |
46 | 'only_matching': True, | |
9d089630 S |
47 | }, { |
48 | # ooyala video | |
49 | 'url': 'http://www.cuatro.com/chesterinlove/a-carta/chester-chester_in_love-chester_edu_2_2331030022.html', | |
50 | 'only_matching': True, | |
c10ea454 | 51 | }] |
12bc2429 S |
52 | |
53 | def _real_extract(self, url): | |
47335a0e RA |
54 | display_id = self._match_id(url) |
55 | webpage = self._download_webpage(url, display_id) | |
56 | title = self._html_search_meta( | |
57 | ['og:title', 'twitter:title'], webpage, 'title') | |
58 | info = self._get_player_info(url, webpage) | |
59 | info.update({ | |
60 | 'display_id': display_id, | |
61 | 'title': title, | |
62 | 'description': self._html_search_meta( | |
63 | ['og:description', 'twitter:description'], | |
64 | webpage, 'title', fatal=False), | |
65 | }) | |
66 | return info |