spike.py 1.6 KB

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