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 SkySportsIE(InfoExtractor):
  5. _VALID_URL = r'https?://(?:www\.)?skysports\.com/watch/video/(?P<id>[0-9]+)'
  6. _TEST = {
  7. 'url': 'http://www.skysports.com/watch/video/10328419/bale-its-our-time-to-shine',
  8. 'md5': 'c44a1db29f27daf9a0003e010af82100',
  9. 'info_dict': {
  10. 'id': '10328419',
  11. 'ext': 'flv',
  12. 'title': 'Bale: Its our time to shine',
  13. 'description': 'md5:9fd1de3614d525f5addda32ac3c482c9',
  14. },
  15. 'add_ie': ['Ooyala'],
  16. }
  17. def _real_extract(self, url):
  18. video_id = self._match_id(url)
  19. webpage = self._download_webpage(url, video_id)
  20. return {
  21. '_type': 'url_transparent',
  22. 'id': video_id,
  23. 'url': 'ooyala:%s' % self._search_regex(
  24. r'data-video-id="([^"]+)"', webpage, 'ooyala id'),
  25. 'title': self._og_search_title(webpage),
  26. 'description': self._og_search_description(webpage),
  27. 'ie_key': 'Ooyala',
  28. }