1 from __future__ import unicode_literals
3 from .common import InfoExtractor
6 class ParliamentLiveUKIE(InfoExtractor):
7 IE_NAME = 'parliamentlive.tv'
8 IE_DESC = 'UK parliament videos'
9 _VALID_URL = r'(?i)https?://(?:www\.)?parliamentlive\.tv/Event/Index/(?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})'
12 'url': 'http://parliamentlive.tv/Event/Index/c1e9d44d-fd6c-4263-b50f-97ed26cc998b',
16 'title': 'Home Affairs Committee',
17 'uploader_id': 'FFMPEG-01',
18 'timestamp': 1422696664,
19 'upload_date': '20150131',
22 'url': 'http://parliamentlive.tv/event/index/3f24936f-130f-40bf-9a5d-b3d6479da6a4',
23 'only_matching': True,
26 def _real_extract(self, url):
27 video_id = self._match_id(url)
28 webpage = self._download_webpage(
29 'http://vodplayer.parliamentlive.tv/?mid=' + video_id, video_id)
30 widget_config = self._parse_json(self._search_regex(
31 r'(?s)kWidgetConfig\s*=\s*({.+});',
32 webpage, 'kaltura widget config'), video_id)
33 kaltura_url = 'kaltura:%s:%s' % (
34 widget_config['wid'][1:], widget_config['entry_id'])
35 event_title = self._download_json(
36 'http://parliamentlive.tv/Event/GetShareVideo/' + video_id, video_id)['event']['title']
38 '_type': 'url_transparent',