]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/maoritv.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class MaoriTVIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?maoritelevision\.com/shows/(?:[^/]+/)+(?P<id>[^/?&#]+)'
10 'url': 'https://www.maoritelevision.com/shows/korero-mai/S01E054/korero-mai-series-1-episode-54',
11 'md5': '5ade8ef53851b6a132c051b1cd858899',
13 'id': '4774724855001',
15 'title': 'KÅrero Mai, Series 1 Episode 54',
16 'upload_date': '20160226',
17 'timestamp': 1456455018,
18 'description': 'md5:59bde32fd066d637a1a55794c56d8dcb',
19 'uploader_id': '1614493167001',
22 BRIGHTCOVE_URL_TEMPLATE
= 'http://players.brightcove.net/1614493167001/HJlhIQhQf_default/index.html?videoId=%s'
24 def _real_extract(self
, url
):
25 display_id
= self
._match
_id
(url
)
26 webpage
= self
._download
_webpage
(url
, display_id
)
27 brightcove_id
= self
._search
_regex
(
28 r
'data-main-video-id=["\'](\d
+)', webpage, 'brightcove
id')
29 return self.url_result(
30 self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id,
31 'BrightcoveNew
', brightcove_id)