]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/canalc2.py
4 from .common
import InfoExtractor
7 class Canalc2IE(InfoExtractor
):
9 _VALID_URL
= r
'http://.*?\.canalc2\.tv/video\.asp\?idVideo=(\d+)&voir=oui'
12 u
'url': u
'http://www.canalc2.tv/video.asp?idVideo=12163&voir=oui',
13 u
'file': u
'12163.mp4',
14 u
'md5': u
'060158428b650f896c542dfbb3d6487f',
16 u
'title': u
'Terrasses du Numérique'
20 def _real_extract(self
, url
):
21 video_id
= re
.match(self
._VALID
_URL
, url
).group(1)
22 webpage
= self
._download
_webpage
(url
, video_id
)
23 file_name
= self
._search
_regex
(
24 r
"so\.addVariable\('file','(.*?)'\);",
26 video_url
= 'http://vod-flash.u-strasbg.fr:8080/' + file_name
28 title
= self
._html
_search
_regex
(
29 r
'class="evenement8">(.*?)</a>', webpage
, u
'title')
31 return {'id': video_id
,