spike.py (1702B)
1 from __future__ import unicode_literals 2 3 from .mtv import MTVServicesInfoExtractor 4 5 6 class BellatorIE(MTVServicesInfoExtractor): 7 _VALID_URL = r'https?://(?:www\.)?bellator\.com/[^/]+/[\da-z]{6}(?:[/?#&]|$)' 8 _TESTS = [{ 9 'url': 'http://www.bellator.com/fight/atwr7k/bellator-158-michael-page-vs-evangelista-cyborg', 10 'info_dict': { 11 'title': 'Michael Page vs. Evangelista Cyborg', 12 'description': 'md5:0d917fc00ffd72dd92814963fc6cbb05', 13 }, 14 'playlist_count': 3, 15 }, { 16 'url': 'http://www.bellator.com/video-clips/bw6k7n/bellator-158-foundations-michael-venom-page', 17 'only_matching': True, 18 }] 19 20 _FEED_URL = 'http://www.bellator.com/feeds/mrss/' 21 _GEO_COUNTRIES = ['US'] 22 23 24 class ParamountNetworkIE(MTVServicesInfoExtractor): 25 _VALID_URL = r'https?://(?:www\.)?paramountnetwork\.com/[^/]+/[\da-z]{6}(?:[/?#&]|$)' 26 _TESTS = [{ 27 'url': 'http://www.paramountnetwork.com/episodes/j830qm/lip-sync-battle-joel-mchale-vs-jim-rash-season-2-ep-13', 28 'info_dict': { 29 'id': '37ace3a8-1df6-48be-85b8-38df8229e241', 30 'ext': 'mp4', 31 'title': 'Lip Sync Battle|April 28, 2016|2|209|Joel McHale Vs. Jim Rash|Act 1', 32 'description': 'md5:a739ca8f978a7802f67f8016d27ce114', 33 }, 34 'params': { 35 # m3u8 download 36 'skip_download': True, 37 }, 38 }] 39 40 _FEED_URL = 'http://feeds.mtvnservices.com/od/feed/intl-mrss-player-feed' 41 _GEO_COUNTRIES = ['US'] 42 43 def _get_feed_query(self, uri): 44 return { 45 'arcEp': 'paramountnetwork.com', 46 'imageEp': 'paramountnetwork.com', 47 'mgid': uri, 48 }