]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/thestar.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class TheStarIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?thestar\.com/(?:[^/]+/)*(?P<id>.+)\.html'
10 'url': 'http://www.thestar.com/life/2016/02/01/mankind-why-this-woman-started-a-men-s-skincare-line.html',
11 'md5': '2c62dd4db2027e35579fefb97a8b6554',
13 'id': '4732393888001',
15 'title': 'Mankind: Why this woman started a men\'s skin care line',
16 'description': 'Robert Cribb talks to Young Lee, the founder of Uncle Peter\'s MAN.',
17 'uploader_id': '794267642001',
18 'timestamp': 1454353482,
19 'upload_date': '20160201',
23 'skip_download': True,
26 BRIGHTCOVE_URL_TEMPLATE
= 'http://players.brightcove.net/794267642001/default_default/index.html?videoId=%s'
28 def _real_extract(self
, url
):
29 display_id
= self
._match
_id
(url
)
30 webpage
= self
._download
_webpage
(url
, display_id
)
31 brightcove_id
= self
._search
_regex
(
32 r
'mainartBrightcoveVideoId["\']?\s
*:\s
*["\']?(\d+)',
33 webpage, 'brightcove id')
34 return self.url_result(
35 self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id,
36 'BrightcoveNew', brightcove_id)