]> gitweb @ CieloNegro.org - youtube-dl.git/blob - youtube_dl/extractor/skysports.py
9dc78c7d2b27748fd2e1c083e7b265448cbff500
[youtube-dl.git] / youtube_dl / extractor / skysports.py
1 # coding: utf-8
2 from __future__ import unicode_literals
3
4 from .common import InfoExtractor
5
6
7 class SkySportsIE(InfoExtractor):
8     _VALID_URL = r'https?://(?:www\.)?skysports\.com/watch/video/(?P<id>[0-9]+)'
9     _TEST = {
10         'url': 'http://www.skysports.com/watch/video/10328419/bale-its-our-time-to-shine',
11         'md5': 'c44a1db29f27daf9a0003e010af82100',
12         'info_dict': {
13             'id': '10328419',
14             'ext': 'flv',
15             'title': 'Bale: Its our time to shine',
16             'description': 'md5:9fd1de3614d525f5addda32ac3c482c9',
17         },
18         'add_ie': ['Ooyala'],
19     }
20
21     def _real_extract(self, url):
22         video_id = self._match_id(url)
23         webpage = self._download_webpage(url, video_id)
24
25         return {
26             '_type': 'url_transparent',
27             'id': video_id,
28             'url': 'ooyala:%s' % self._search_regex(
29                 r'data-video-id="([^"]+)"', webpage, 'ooyala id'),
30             'title': self._og_search_title(webpage),
31             'description': self._og_search_description(webpage),
32             'ie_key': 'Ooyala',
33         }