]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/aljazeera.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
6 class AlJazeeraIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://(?:www\.)?aljazeera\.com/(?:programmes|video)/.*?/(?P<id>[^/]+)\.html'
10 'url': 'http://www.aljazeera.com/programmes/the-slum/2014/08/deliverance-201482883754237240.html',
12 'id': '3792260579001',
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.',
16 'uploader_id': '665003303001',
17 'timestamp': 1411116829,
18 'upload_date': '20140919',
20 'add_ie': ['BrightcoveNew'],
21 'skip': 'Not accessible from Travis CI server',
23 'url': 'http://www.aljazeera.com/video/news/2017/05/sierra-leone-709-carat-diamond-auctioned-170511100111930.html',
24 'only_matching': True,
26 BRIGHTCOVE_URL_TEMPLATE
= 'http://players.brightcove.net/665003303001/default_default/index.html?videoId=%s'
28 def _real_extract(self
, url
):
29 program_name
= self
._match
_id
(url
)
30 webpage
= self
._download
_webpage
(url
, program_name
)
31 brightcove_id
= self
._search
_regex
(
32 r
'RenderPagesVideo\(\'(.+?
)\'', webpage, 'brightcove
id')
33 return self.url_result(self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id, 'BrightcoveNew
', brightcove_id)