3 import xml.etree.ElementTree
5 from .common import InfoExtractor
11 class PluzzIE(InfoExtractor):
12 IE_NAME = u'pluzz.francetv.fr'
13 _VALID_URL = r'https?://pluzz\.francetv\.fr/videos/(.*?)\.html'
16 u'url': u'http://pluzz.francetv.fr/videos/allo_rufo_saison5_,88439064.html',
17 u'file': u'88439064.mp4',
19 u'title': u'AllĂ´ Rufo',
20 u'description': u'md5:d909f1ebdf963814b65772aea250400e',
23 u'skip_download': True,
27 def _real_extract(self, url):
28 title = re.match(self._VALID_URL, url).group(1)
29 webpage = self._download_webpage(url, title)
30 video_id = self._search_regex(
31 r'data-diffusion="(\d+)"', webpage, 'ID')
33 xml_desc = self._download_webpage(
34 'http://www.pluzz.fr/appftv/webservices/video/'
35 'getInfosOeuvre.php?id-diffusion='
36 + video_id, title, 'Downloading XML config')
37 info = xml.etree.ElementTree.fromstring(xml_desc.encode('utf-8'))
39 manifest_url = info.find('videos/video/url').text
40 video_url = manifest_url.replace('manifest.f4m', 'index_2_av.m3u8')
41 video_url = video_url.replace('/z/', '/i/')
42 thumbnail_path = info.find('image').text
44 return {'id': video_id,
47 'title': info.find('titre').text,
48 'thumbnail': compat_urlparse.urljoin(url, thumbnail_path),
49 'description': info.find('synopsis').text,