]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/biobiochiletv.py
   2 from __future__ 
import unicode_literals
 
   4 from .common 
import InfoExtractor
 
   9 from .rudo 
import RudoIE
 
  12 class BioBioChileTVIE(InfoExtractor
): 
  13     _VALID_URL 
= r
'https?://(?:tv|www)\.biobiochile\.cl/(?:notas|noticias)/(?:[^/]+/)+(?P<id>[^/]+)\.shtml' 
  16         'url': 'http://tv.biobiochile.cl/notas/2015/10/21/sobre-camaras-y-camarillas-parlamentarias.shtml', 
  17         'md5': '26f51f03cf580265defefb4518faec09', 
  19             'id': 'sobre-camaras-y-camarillas-parlamentarias', 
  21             'title': 'Sobre Cámaras y camarillas parlamentarias', 
  22             'thumbnail': 're:^https?://.*\.jpg$', 
  23             'uploader': 'Fernando Atria', 
  25         'skip': 'URL expired and redirected to http://www.biobiochile.cl/portada/bbtv/index.html', 
  27         # different uploader layout 
  28         'url': 'http://tv.biobiochile.cl/notas/2016/03/18/natalia-valdebenito-repasa-a-diputado-hasbun-paso-a-la-categoria-de-hablar-brutalidades.shtml', 
  29         'md5': 'edc2e6b58974c46d5b047dea3c539ff3', 
  31             'id': 'natalia-valdebenito-repasa-a-diputado-hasbun-paso-a-la-categoria-de-hablar-brutalidades', 
  33             'title': 'Natalia Valdebenito repasa a diputado Hasbún: Pasó a la categoría de hablar brutalidades', 
  34             'thumbnail': 're:^https?://.*\.jpg$', 
  35             'uploader': 'Piangella Obrador', 
  38             'skip_download': True, 
  40         'skip': 'URL expired and redirected to http://www.biobiochile.cl/portada/bbtv/index.html', 
  42         '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', 
  44             'id': 'edecanes-del-congreso-figuras-decorativas-que-le-cuestan-muy-caro-a-los-chilenos', 
  47             'upload_date': '20160708', 
  48             'title': 'Edecanes del Congreso: Figuras decorativas que le cuestan muy caro a los chilenos', 
  51         'url': 'http://tv.biobiochile.cl/notas/2015/10/22/ninos-transexuales-de-quien-es-la-decision.shtml', 
  52         'only_matching': True, 
  54         'url': 'http://tv.biobiochile.cl/notas/2015/10/21/exclusivo-hector-pinto-formador-de-chupete-revela-version-del-ex-delantero-albo.shtml', 
  55         'only_matching': True, 
  58     def _real_extract(self
, url
): 
  59         video_id 
= self
._match
_id
(url
) 
  61         webpage 
= self
._download
_webpage
(url
, video_id
) 
  63         rudo_url 
= RudoIE
._extract
_url
(webpage
) 
  65             raise ExtractorError('No videos found') 
  67         title 
= remove_end(self
._og
_search
_title
(webpage
), ' - BioBioChile TV') 
  69         thumbnail 
= self
._og
_search
_thumbnail
(webpage
) 
  70         uploader 
= self
._html
_search
_regex
( 
  71             r
'<a[^>]+href=["\']https?
://(?
:busca|www
)\
.biobiochile\
.cl
/(?
:lista
/)?
(?
:author|autor
)[^
>]+>(.+?
)</a
>', 
  72             webpage, 'uploader
', fatal=False) 
  75             '_type
': 'url_transparent
', 
  79             'thumbnail
': thumbnail,