013e86a60e210e893ef176cb867e6fa437ea5d54
[youtube-dl] / youtube_dl / extractor / utv.py
1 import re
2
3 from .common import InfoExtractor
4
5 class UTVIE(InfoExtractor):
6     _VALID_URL = r'http://utv.unistra.fr/index.php\?id_video\=(\d+)'
7
8     def _real_extract(self, url):
9         id = re.match(self._VALID_URL, url).group(1)
10         webpage = self._download_webpage(url, id)
11         url = re.search(r'file: "(.*?)",', webpage).group(1)
12         title = re.search(r'/utv/\d+/.*/(.*?).mp4', url).group(1)
13         
14         video_url = 'http://vod-flash.u-strasbg.fr:8080/' + url
15
16         track_info = {'id':id,
17                       'title' : title,
18                       'ext' :   'mp4',
19                       'url' :   video_url
20                       }
21
22         return [track_info]