-from __future__ import unicode_literals
-
-import re
-
from .common import InfoExtractor
from ..utils import (
determine_ext,
class BYUtvIE(InfoExtractor):
+ _WORKING = False
_VALID_URL = r'https?://(?:www\.)?byutv\.org/(?:watch|player)/(?!event/)(?P<id>[0-9a-f-]+)(?:/(?P<display_id>[^/?#&]+))?'
_TESTS = [{
- # ooyalaVOD
'url': 'http://www.byutv.org/watch/6587b9a3-89d2-42a6-a7f7-fd2f81840a7d/studio-c-season-5-episode-5',
'info_dict': {
'id': 'ZvanRocTpW-G5_yZFeltTAMv6jxOU9KH',
'params': {
'skip_download': True,
},
- 'add_ie': ['Ooyala'],
}, {
# dvr
'url': 'https://www.byutv.org/player/8f1dab9b-b243-47c8-b525-3e2d021a3451/byu-softball-pacific-vs-byu-41219---game-2',
'duration': 11645,
},
'params': {
- 'skip_download': True
+ 'skip_download': True,
},
}, {
'url': 'http://www.byutv.org/watch/6587b9a3-89d2-42a6-a7f7-fd2f81840a7d',
}]
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
+ mobj = self._match_valid_url(url)
video_id = mobj.group('id')
display_id = mobj.group('display_id') or video_id
'x-byutv-platformkey': 'xsaaw9c7y5',
})
- ep = video.get('ooyalaVOD')
- if ep:
- return {
- '_type': 'url_transparent',
- 'ie_key': 'Ooyala',
- 'url': 'ooyala:%s' % ep['providerId'],
- 'id': video_id,
- 'display_id': display_id,
- 'title': ep.get('title'),
- 'description': ep.get('description'),
- 'thumbnail': ep.get('imageThumbnail'),
- }
-
info = {}
formats = []
subtitles = {}
'thumbnail': ep.get('imageThumbnail'),
'duration': parse_duration(ep.get('length')),
})
- self._sort_formats(formats)
return merge_dicts(info, {
'id': video_id,