]> jfr.im git - yt-dlp.git/blame - youtube_dlc/extractor/uktvplay.py
Update to ytdl-2021.01.03
[yt-dlp.git] / youtube_dlc / extractor / uktvplay.py
CommitLineData
f59d1146
RA
1# coding: utf-8
2from __future__ import unicode_literals
3
4from .common import InfoExtractor
5
6
7class UKTVPlayIE(InfoExtractor):
29f7c58a 8 _VALID_URL = r'https?://uktvplay\.uktv\.co\.uk/(?:.+?\?.*?\bvideo=|([^/]+/)*watch-online/)(?P<id>\d+)'
9 _TESTS = [{
f59d1146 10 'url': 'https://uktvplay.uktv.co.uk/shows/world-at-war/c/200/watch-online/?video=2117008346001',
f59d1146
RA
11 'info_dict': {
12 'id': '2117008346001',
13 'ext': 'mp4',
14 'title': 'Pincers',
15 'description': 'Pincers',
16 'uploader_id': '1242911124001',
17 'upload_date': '20130124',
18 'timestamp': 1359049267,
19 },
20 'params': {
21 # m3u8 download
22 'skip_download': True,
23 },
24 'expected_warnings': ['Failed to download MPD manifest']
29f7c58a 25 }, {
26 'url': 'https://uktvplay.uktv.co.uk/shows/africa/watch-online/5983349675001',
27 'only_matching': True,
28 }]
29 # BRIGHTCOVE_URL_TEMPLATE = 'https://players.brightcove.net/1242911124001/OrCyvJ2gyL_default/index.html?videoId=%s'
f59d1146
RA
30 BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/1242911124001/H1xnMOqP_default/index.html?videoId=%s'
31
32 def _real_extract(self, url):
33 video_id = self._match_id(url)
34 return self.url_result(
35 self.BRIGHTCOVE_URL_TEMPLATE % video_id,
36 'BrightcoveNew', video_id)