+ 'title': 'C à dire ?!',
+ 'description': 'md5:fb1db1cbad784dcce7c7a7bd177c8e2f',
+ },
+ 'params': {
+ # m3u8 download
+ 'skip_download': True,
+ },
+ },
+ # franceo
+ {
+ 'url': 'http://www.franceo.fr/jt/info-afrique/04-12-2013',
+ 'info_dict': {
+ 'id': '92327925',
+ 'ext': 'mp4',
+ 'title': 'Infô-Afrique',
+ 'description': 'md5:ebf346da789428841bee0fd2a935ea55',
+ },
+ 'params': {
+ # m3u8 download
+ 'skip_download': True,
+ },
+ 'skip': 'The id changes frequently',
+ },
+ ]
+
+ def _real_extract(self, url):
+ mobj = re.match(self._VALID_URL, url)
+ if mobj.group('key'):
+ webpage = self._download_webpage(url, mobj.group('key'))
+ id_res = [
+ (r'''(?x)<div\s+class="video-player">\s*
+ <a\s+href="http://videos.francetv.fr/video/([0-9]+)"\s+
+ class="francetv-video-player">'''),
+ (r'<a id="player_direct" href="http://info\.francetelevisions'
+ '\.fr/\?id-video=([^"/&]+)'),
+ (r'<a class="video" id="ftv_player_(.+?)"'),
+ ]
+ video_id = self._html_search_regex(id_res, webpage, 'video ID')
+ else:
+ video_id = mobj.group('id')
+ return self._extract_video(video_id)
+
+
+class GenerationQuoiIE(InfoExtractor):
+ IE_NAME = 'france2.fr:generation-quoi'
+ _VALID_URL = r'https?://generation-quoi\.france2\.fr/portrait/(?P<name>.*)(\?|$)'
+
+ _TEST = {
+ 'url': 'http://generation-quoi.france2.fr/portrait/garde-a-vous',
+ 'file': 'k7FJX8VBcvvLmX4wA5Q.mp4',
+ 'info_dict': {
+ 'title': 'Génération Quoi - Garde à Vous',
+ 'uploader': 'Génération Quoi',
+ },
+ 'params': {
+ # It uses Dailymotion
+ 'skip_download': True,
+ },
+ 'skip': 'Only available from France',
+ }
+
+ def _real_extract(self, url):
+ mobj = re.match(self._VALID_URL, url)
+ name = mobj.group('name')
+ info_url = compat_urlparse.urljoin(url, '/medias/video/%s.json' % name)
+ info_json = self._download_webpage(info_url, name)
+ info = json.loads(info_json)
+ return self.url_result('http://www.dailymotion.com/video/%s' % info['id'],
+ ie='Dailymotion')
+
+
+class CultureboxIE(FranceTVBaseInfoExtractor):
+ IE_NAME = 'culturebox.francetvinfo.fr'
+ _VALID_URL = r'https?://(?:m\.)?culturebox\.francetvinfo\.fr/(?P<name>.*?)(\?|$)'
+
+ _TEST = {
+ 'url': 'http://culturebox.francetvinfo.fr/einstein-on-the-beach-au-theatre-du-chatelet-146813',
+ 'info_dict': {
+ 'id': 'EV_6785',
+ 'ext': 'mp4',
+ 'title': 'Einstein on the beach au Théâtre du Châtelet',
+ 'description': 'md5:9ce2888b1efefc617b5e58b3f6200eeb',
+ },
+ 'params': {
+ # m3u8 download
+ 'skip_download': True,
+ },
+ }
+
+ def _real_extract(self, url):
+ mobj = re.match(self._VALID_URL, url)
+ name = mobj.group('name')
+ webpage = self._download_webpage(url, name)
+ video_id = self._search_regex(r'"http://videos\.francetv\.fr/video/(.*?)"', webpage, 'video id')
+ return self._extract_video(video_id)