]>
 
 
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/canal13cl.py 
 
 
 
 
 
 
 
 
   2  from  __future__ 
import  unicode_literals
 
   6  from  . common 
import  InfoExtractor
 
   9  class  Canal13clIE ( InfoExtractor
):  
  10      _VALID_URL 
=  r
'^http://(?:www\.)?13\.cl/(?:[^/?#]+/)*(?P<id>[^/?#]+)'  
  12          'url' :  'http://www.13.cl/t13/nacional/el-circulo-de-hierro-de-michelle-bachelet-en-su-regreso-a-la-moneda' ,  
  13          'md5' :  '4cb1fa38adcad8fea88487a078831755' ,  
  16              'display_id' :  'el-circulo-de-hierro-de-michelle-bachelet-en-su-regreso-a-la-moneda' ,  
  18              'title' :  'El "círculo de hierro" de Michelle Bachelet en su regreso a La Moneda' ,  
  19              'description' :  '(Foto: Agencia Uno) En nueve días más, Michelle Bachelet va a asumir por segunda vez como presidenta de la República. Entre aquellos que la acompañarán hay caras que se repiten y otras que se consolidan en su entorno de colaboradores más cercanos.' ,  
  23      def  _real_extract ( self
,  url
):  
  24          mobj 
=  re
. match ( self
._ VALID
_U RL
,  url
)  
  25          display_id 
=  mobj
. group ( 'id' )  
  27          webpage 
=  self
._ download
_ webpage
( url
,  display_id
)  
  29          title 
=  self
._ html
_ search
_ meta
(  
  30              'twitter:title' ,  webpage
,  'title' ,  fatal
= True )  
  31          description 
=  self
._ html
_ search
_ meta
(  
  32              'twitter:description' ,  webpage
,  'description' )  
  33          url 
=  self
._ html
_ search
_ regex
(  
  34              r
'articuloVideo = \"(.*?)\"' ,  webpage
,  'url' )  
  35          real_id 
=  self
._ search
_ regex
(  
  36              r
'[^0-9]([0-9]{7,})[^0-9]' ,  url
,  'id' ,  default
= display_id
)  
  37          thumbnail 
=  self
._ html
_ search
_ regex
(  
  38              r
'articuloImagen = \"(.*?)\"' ,  webpage
,  'thumbnail' )  
  42              'display_id' :  display_id
,  
  45              'description' :  description
,  
  47              'thumbnail' :  thumbnail
,