You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.1 KiB

  1. # coding: utf-8
  2. from __future__ import unicode_literals
  3. from .common import InfoExtractor
  4. class UKTVPlayIE(InfoExtractor):
  5. _VALID_URL = r'https?://uktvplay\.uktv\.co\.uk/.+?\?.*?\bvideo=(?P<id>\d+)'
  6. _TEST = {
  7. 'url': 'https://uktvplay.uktv.co.uk/shows/world-at-war/c/200/watch-online/?video=2117008346001',
  8. 'md5': '',
  9. 'info_dict': {
  10. 'id': '2117008346001',
  11. 'ext': 'mp4',
  12. 'title': 'Pincers',
  13. 'description': 'Pincers',
  14. 'uploader_id': '1242911124001',
  15. 'upload_date': '20130124',
  16. 'timestamp': 1359049267,
  17. },
  18. 'params': {
  19. # m3u8 download
  20. 'skip_download': True,
  21. },
  22. 'expected_warnings': ['Failed to download MPD manifest']
  23. }
  24. BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/1242911124001/H1xnMOqP_default/index.html?videoId=%s'
  25. def _real_extract(self, url):
  26. video_id = self._match_id(url)
  27. return self.url_result(
  28. self.BRIGHTCOVE_URL_TEMPLATE % video_id,
  29. 'BrightcoveNew', video_id)