1 from .common
import InfoExtractor
2 from .arkena
import ArkenaIE
5 class LcpPlayIE(ArkenaIE
): # XXX: Do not subclass from concrete IE
6 _VALID_URL
= r
'https?://play\.lcp\.fr/embed/(?P<id>[^/]+)/(?P<account_id>[^/]+)/[^/]+/[^/]+'
8 'url': 'http://play.lcp.fr/embed/327336/131064/darkmatter/0',
9 'md5': 'b8bd9298542929c06c1c15788b1f277a',
14 'timestamp': 1456391602,
15 'upload_date': '20160225',
18 'skip_download': True,
23 class LcpIE(InfoExtractor
):
24 _VALID_URL
= r
'https?://(?:www\.)?lcp\.fr/(?:[^/]+/)*(?P<id>[^/]+)'
28 'url': 'http://www.lcp.fr/la-politique-en-video/schwartzenberg-prg-preconise-francois-hollande-de-participer-une-primaire',
29 'md5': 'b8bd9298542929c06c1c15788b1f277a',
33 'title': 'Schwartzenberg (PRG) préconise à François Hollande de participer à une primaire à gauche',
34 'description': 'md5:96ad55009548da9dea19f4120c6c16a8',
35 'timestamp': 1456488895,
36 'upload_date': '20160226',
39 'skip_download': True,
42 # dailymotion live stream
43 'url': 'http://www.lcp.fr/le-direct',
47 'title': 'La Chaine Parlementaire (LCP), Live TNT',
48 'description': 'md5:5c69593f2de0f38bd9a949f2c95e870b',
50 'uploader_id': 'xbz33d',
51 'timestamp': 1308923058,
52 'upload_date': '20110624',
56 'skip_download': True,
59 'url': 'http://www.lcp.fr/emissions/277792-les-volontaires',
60 'only_matching': True,
63 def _real_extract(self
, url
):
64 display_id
= self
._match
_id
(url
)
66 webpage
= self
._download
_webpage
(url
, display_id
)
68 play_url
= self
._search
_regex
(
69 r
'<iframe[^>]+src=(["\'])(?P
<url
>%s?
(?
:(?
!\
1).)*)\
1' % LcpPlayIE._VALID_URL,
70 webpage, 'play iframe
', default=None, group='url
')
73 return self.url_result(url, 'Generic
')
75 title = self._og_search_title(webpage, default=None) or self._html_search_meta(
76 'twitter
:title
', webpage, fatal=True)
77 description = self._html_search_meta(
78 ('description
', 'twitter
:description
'), webpage)
81 '_type
': 'url_transparent
',
82 'ie_key
': LcpPlayIE.ie_key(),
84 'display_id
': display_id,
86 'description
': description,