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