2016-12-20 04:52:46 -07:00
|
|
|
from .common import InfoExtractor
|
|
|
|
|
|
|
|
|
|
|
|
class UKTVPlayIE(InfoExtractor):
|
2022-11-07 09:16:47 -07:00
|
|
|
_VALID_URL = r'https?://uktvplay\.(?:uktv\.)?co\.uk/(?:.+?\?.*?\bvideo=|([^/]+/)*)(?P<id>\d+)'
|
2021-01-01 05:26:37 -07:00
|
|
|
_TESTS = [{
|
2016-12-20 04:52:46 -07:00
|
|
|
'url': 'https://uktvplay.uktv.co.uk/shows/world-at-war/c/200/watch-online/?video=2117008346001',
|
|
|
|
'info_dict': {
|
|
|
|
'id': '2117008346001',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Pincers',
|
|
|
|
'description': 'Pincers',
|
|
|
|
'uploader_id': '1242911124001',
|
|
|
|
'upload_date': '20130124',
|
|
|
|
'timestamp': 1359049267,
|
|
|
|
},
|
|
|
|
'params': {
|
|
|
|
# m3u8 download
|
|
|
|
'skip_download': True,
|
|
|
|
},
|
2024-06-11 17:09:58 -06:00
|
|
|
'expected_warnings': ['Failed to download MPD manifest'],
|
2021-01-01 05:26:37 -07:00
|
|
|
}, {
|
|
|
|
'url': 'https://uktvplay.uktv.co.uk/shows/africa/watch-online/5983349675001',
|
|
|
|
'only_matching': True,
|
2022-11-07 09:16:47 -07:00
|
|
|
}, {
|
|
|
|
'url': 'https://uktvplay.co.uk/shows/hornby-a-model-world/series-1/episode-1/6276739790001?autoplaying=true',
|
|
|
|
'only_matching': True,
|
2021-01-01 05:26:37 -07:00
|
|
|
}]
|
|
|
|
# BRIGHTCOVE_URL_TEMPLATE = 'https://players.brightcove.net/1242911124001/OrCyvJ2gyL_default/index.html?videoId=%s'
|
2016-12-20 04:52:46 -07:00
|
|
|
BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/1242911124001/H1xnMOqP_default/index.html?videoId=%s'
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
video_id = self._match_id(url)
|
|
|
|
return self.url_result(
|
|
|
|
self.BRIGHTCOVE_URL_TEMPLATE % video_id,
|
|
|
|
'BrightcoveNew', video_id)
|