]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/radiofrance.py
4 from . common
import InfoExtractor
7 class RadioFranceIE ( InfoExtractor
):
8 _VALID_URL
= r
'^https?://maison\.radiofrance\.fr/radiovisions/(?P<id>[^?#]+)'
9 IE_NAME
= u
'radiofrance'
12 u
'url' : u
'http://maison.radiofrance.fr/radiovisions/one-one' ,
13 u
'file' : u
'one-one.ogg' ,
14 u
'md5' : u
'bdbb28ace95ed0e04faab32ba3160daf' ,
16 u
"title" : u
"One to one" ,
17 u
"description" : u
"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." ,
18 u
"uploader" : u
"Thomas Hercouët" ,
22 def _real_extract ( self
, url
):
23 m
= re
. match ( self
._ VALID
_U RL
, url
)
24 video_id
= m
. group ( 'id' )
26 webpage
= self
._ download
_ webpage
( url
, video_id
)
27 title
= self
._ html
_ search
_ regex
( r
'<h1>(.*?)</h1>' , webpage
, u
'title' )
28 description
= self
._ html
_ search
_ regex
(
29 r
'<div class="bloc_page_wrapper"><div class="text">(.*?)</div>' ,
30 webpage
, u
'description' , fatal
= False )
31 uploader
= self
._ html
_ search
_ regex
(
32 r
'<div class="credit"> © (.*?)</div>' ,
33 webpage
, u
'uploader' , fatal
= False )
35 formats_str
= self
._ html
_ search
_ regex
(
36 r
'class="jp-jplayer[^"]*" data-source="([^"]+)">' ,
37 webpage
, u
'audio URLs' )
45 re
. findall ( r
"([a-z0-9]+)\s*:\s*'([^']+)'" , formats_str
)
47 # No sorting, we don't know any more about these formats
53 'description' : description
,