]>
Commit | Line | Data |
---|---|---|
37381350 PH |
1 | from __future__ import unicode_literals |
2 | ||
bb18d787 JMF |
3 | from .common import InfoExtractor |
4 | ||
5 | ||
6 | class AlJazeeraIE(InfoExtractor): | |
7 | _VALID_URL = r'http://www\.aljazeera\.com/programmes/.*?/(?P<id>[^/]+)\.html' | |
8 | ||
9 | _TEST = { | |
10 | 'url': 'http://www.aljazeera.com/programmes/the-slum/2014/08/deliverance-201482883754237240.html', | |
11 | 'info_dict': { | |
12 | 'id': '3792260579001', | |
13 | 'ext': 'mp4', | |
14 | 'title': 'The Slum - Episode 1: Deliverance', | |
15 | 'description': 'As a birth attendant advocating for family planning, Remy is on the frontline of Tondo\'s battle with overcrowding.', | |
cb6e477d | 16 | 'uploader_id': '665003303001', |
17 | 'timestamp': 1411116829, | |
18 | 'upload_date': '20140919', | |
bb18d787 | 19 | }, |
cb6e477d | 20 | 'add_ie': ['BrightcoveNew'], |
cf33a47d | 21 | 'skip': 'Not accessible from Travis CI server', |
bb18d787 | 22 | } |
cb6e477d | 23 | BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/665003303001/default_default/index.html?videoId=%s' |
bb18d787 JMF |
24 | |
25 | def _real_extract(self, url): | |
26 | program_name = self._match_id(url) | |
27 | webpage = self._download_webpage(url, program_name) | |
28 | brightcove_id = self._search_regex( | |
29 | r'RenderPagesVideo\(\'(.+?)\'', webpage, 'brightcove id') | |
cb6e477d | 30 | return self.url_result(self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id, 'BrightcoveNew', brightcove_id) |