]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/radiofrance.py 
   2  from  __future__ 
import  unicode_literals
   6  from  . common 
import  InfoExtractor
   9  class  RadioFranceIE ( InfoExtractor
):   10      _VALID_URL 
=  r
'^https?://maison\.radiofrance\.fr/radiovisions/(?P<id>[^?#]+)'   11      IE_NAME 
=  'radiofrance'   14          'url' :  'http://maison.radiofrance.fr/radiovisions/one-one' ,   15          'md5' :  'bdbb28ace95ed0e04faab32ba3160daf' ,   19              'title' :  'One to one' ,   20              'description' :  "Plutôt que d'imaginer la radio de demain comme technologie ou comme création de contenu, je veux montrer que quelles que soient ses évolutions, j'ai l'intime conviction que la radio continuera d'être un grand média de proximité pour les auditeurs." ,   21              'uploader' :  'Thomas Hercouët' ,   25      def  _real_extract ( self
,  url
):   26          m 
=  re
. match ( self
._ VALID
_U RL
,  url
)   27          video_id 
=  m
. group ( 'id' )   29          webpage 
=  self
._ download
_ webpage
( url
,  video_id
)   30          title 
=  self
._ html
_ search
_ regex
( r
'<h1>(.*?)</h1>' ,  webpage
,  'title' )   31          description 
=  self
._ html
_ search
_ regex
(   32              r
'<div class="bloc_page_wrapper"><div class="text">(.*?)</div>' ,   33              webpage
,  'description' ,  fatal
= False )   34          uploader 
=  self
._ html
_ search
_ regex
(   35              r
'<div class="credit">  © (.*?)</div>' ,   36              webpage
,  'uploader' ,  fatal
= False )   38          formats_str 
=  self
._ html
_ search
_ regex
(   39              r
'class="jp-jplayer[^"]*" data-source="([^"]+)">' ,   40              webpage
,  'audio URLs' )   49              enumerate ( re
. findall ( r
"([a-z0-9]+)\s*:\s*'([^']+)'" ,  formats_str
))   51          self
._ sort
_ formats
( formats
)   57              'description' :  description
,