logo

youtube-dl

[mirror] Download/Watch videos from video hostersgit clone https://hacktivis.me/git/mirror/youtube-dl.git

spike.py (1702B)


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