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.

34 lines
1.1 KiB

  1. # coding: utf-8
  2. from __future__ import unicode_literals
  3. from .common import InfoExtractor
  4. from ..utils import strip_or_none
  5. class SkySportsIE(InfoExtractor):
  6. _VALID_URL = r'https?://(?:www\.)?skysports\.com/watch/video/(?P<id>[0-9]+)'
  7. _TEST = {
  8. 'url': 'http://www.skysports.com/watch/video/10328419/bale-its-our-time-to-shine',
  9. 'md5': '77d59166cddc8d3cb7b13e35eaf0f5ec',
  10. 'info_dict': {
  11. 'id': '10328419',
  12. 'ext': 'mp4',
  13. 'title': 'Bale: It\'s our time to shine',
  14. 'description': 'md5:e88bda94ae15f7720c5cb467e777bb6d',
  15. },
  16. 'add_ie': ['Ooyala'],
  17. }
  18. def _real_extract(self, url):
  19. video_id = self._match_id(url)
  20. webpage = self._download_webpage(url, video_id)
  21. return {
  22. '_type': 'url_transparent',
  23. 'id': video_id,
  24. 'url': 'ooyala:%s' % self._search_regex(
  25. r'data-video-id="([^"]+)"', webpage, 'ooyala id'),
  26. 'title': self._og_search_title(webpage),
  27. 'description': strip_or_none(self._og_search_description(webpage)),
  28. 'ie_key': 'Ooyala',
  29. }