]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/franceinter.py
deb1b0b9dc55244874029af3c47412184c2c1e50
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
9 class FranceInterIE(InfoExtractor
):
10 _VALID_URL
= r
'http://(?:www\.)?franceinter\.fr/player/reecouter\?play=(?P<id>[0-9]{6})'
12 'url': 'http://www.franceinter.fr/player/reecouter?play=793962',
14 'md5': '4764932e466e6f6c79c317d2e74f6884',
16 "title": "L’Histoire dans les jeux vidéo",
20 def _real_extract(self
, url
):
21 mobj
= re
.match(self
._VALID
_URL
, url
)
22 video_id
= mobj
.group('id')
24 webpage
= self
._download
_webpage
(url
, video_id
)
25 title
= self
._html
_search
_regex
(
26 r
'<span class="roll_overflow">(.*?)</span></h1>', webpage
, 'title')
27 path
= self
._search
_regex
(
28 r
'&urlAOD=(.*?)&startTime', webpage
, 'video url')
29 video_url
= 'http://www.franceinter.fr/' + path