2 from __future__ import unicode_literals
4 from .common import InfoExtractor
11 class BioBioChileTVIE(InfoExtractor):
12 _VALID_URL = r'https?://(?:tv|www)\.biobiochile\.cl/(?:notas|noticias)/(?:[^/]+/)+(?P<id>[^/]+)\.shtml'
15 'url': 'http://tv.biobiochile.cl/notas/2015/10/21/sobre-camaras-y-camarillas-parlamentarias.shtml',
16 'md5': '26f51f03cf580265defefb4518faec09',
18 'id': 'sobre-camaras-y-camarillas-parlamentarias',
20 'title': 'Sobre Cámaras y camarillas parlamentarias',
21 'thumbnail': r're:^https?://.*\.jpg$',
22 'uploader': 'Fernando Atria',
24 'skip': 'URL expired and redirected to http://www.biobiochile.cl/portada/bbtv/index.html',
26 # different uploader layout
27 'url': 'http://tv.biobiochile.cl/notas/2016/03/18/natalia-valdebenito-repasa-a-diputado-hasbun-paso-a-la-categoria-de-hablar-brutalidades.shtml',
28 'md5': 'edc2e6b58974c46d5b047dea3c539ff3',
30 'id': 'natalia-valdebenito-repasa-a-diputado-hasbun-paso-a-la-categoria-de-hablar-brutalidades',
32 'title': 'Natalia Valdebenito repasa a diputado Hasbún: Pasó a la categoría de hablar brutalidades',
33 'thumbnail': r're:^https?://.*\.jpg$',
34 'uploader': 'Piangella Obrador',
37 'skip_download': True,
39 'skip': 'URL expired and redirected to http://www.biobiochile.cl/portada/bbtv/index.html',
41 'url': 'http://www.biobiochile.cl/noticias/bbtv/comentarios-bio-bio/2016/07/08/edecanes-del-congreso-figuras-decorativas-que-le-cuestan-muy-caro-a-los-chilenos.shtml',
45 # TODO: fix url_transparent information overriding
46 # 'uploader': 'Juan Pablo Echenique',
47 'title': 'Comentario Oscar Cáceres',
51 'skip_download': True,
54 'url': 'http://tv.biobiochile.cl/notas/2015/10/22/ninos-transexuales-de-quien-es-la-decision.shtml',
55 'only_matching': True,
57 'url': 'http://tv.biobiochile.cl/notas/2015/10/21/exclusivo-hector-pinto-formador-de-chupete-revela-version-del-ex-delantero-albo.shtml',
58 'only_matching': True,
61 def _real_extract(self, url):
62 video_id = self._match_id(url)
64 webpage = self._download_webpage(url, video_id)
66 rudo_url = self._search_regex(
67 r'<iframe[^>]+src=(?P<q1>[\'"])(?P<url>(?:https?:)?//rudo\.video/vod/[0-9a-zA-Z]+)(?P=q1)',
68 webpage, 'embed URL', None, group='url')
70 raise ExtractorError('No videos found')
72 title = remove_end(self._og_search_title(webpage), ' - BioBioChile TV')
74 thumbnail = self._og_search_thumbnail(webpage)
75 uploader = self._html_search_regex(
76 r'<a[^>]+href=["\'](?:https?://(?:busca|www)\.biobiochile\.cl)?/(?:lista/)?(?:author|autor)[^>]+>(.+?)</a>',
77 webpage, 'uploader', fatal=False)
80 '_type': 'url_transparent',
84 'thumbnail': thumbnail,