3 from .common import InfoExtractor
6 class InaIE(InfoExtractor):
7 """Information Extractor for Ina.fr"""
8 _VALID_URL = r'(?:http://)?(?:www\.)?ina\.fr/video/(?P<id>I[0-9]+)/.*'
10 def _real_extract(self,url):
11 mobj = re.match(self._VALID_URL, url)
13 video_id = mobj.group('id')
14 mrss_url='http://player.ina.fr/notices/%s.mrss' % video_id
15 video_extension = 'mp4'
16 webpage = self._download_webpage(mrss_url, video_id)
18 self.report_extraction(video_id)
20 video_url = self._html_search_regex(r'<media:player url="(?P<mp4url>http://mp4.ina.fr/[^"]+\.mp4)',
21 webpage, u'video URL')
23 video_title = self._search_regex(r'<title><!\[CDATA\[(?P<titre>.*?)]]></title>',
29 'ext': video_extension,