2 from __future__ import unicode_literals
3 from .common import InfoExtractor
5 class LcpIE(InfoExtractor):
7 _VALID_URL = r'https?://(?:www\.)?lcp\.fr/(?:[^\/]+/)*(?P<id>[^/]+)'
10 'url': 'http://www.lcp.fr/la-politique-en-video/schwartzenberg-prg-preconise-francois-hollande-de-participer-une-primaire',
11 'md5': 'ab96c4dae94322ece1e98d97c8dc7807',
14 'url': 're:http://httpod.scdn.arkena.com/11970/d56d03e9_.*',
17 'upload_date': '20160226',
18 'timestamp': 1456488895
21 'url': 'http://www.lcp.fr/le-direct',
23 'title': 'Le direct | LCP Assembl\xe9e nationale',
26 'playlist_mincount': 1
29 def _real_extract(self, url):
30 display_id = self._match_id(url)
31 webpage = self._download_webpage(url, display_id)
33 embed_url_regex = r'"(?P<url>(?:https?://(?:www\.)?)?play\.lcp\.fr/embed/[A-za-z0-9]+/[A-za-z0-9]+/[A-za-z0-9]+/[A-za-z0-9]+)"'
34 embed_url = self._html_search_regex(embed_url_regex, webpage, 'player_url', default=None, fatal=False)
36 return self.url_result(url, 'Generic')
38 title = self._og_search_title(webpage, default=None)
39 return self.url_result(embed_url, 'ArkenaPlay', video_id=display_id, video_title=title)