logo

youtube-dl

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

comedycentral.py (2036B)


  1. from __future__ import unicode_literals
  2. from .mtv import MTVServicesInfoExtractor
  3. class ComedyCentralIE(MTVServicesInfoExtractor):
  4. _VALID_URL = r'https?://(?:www\.)?cc\.com/(?:episodes|video(?:-clips)?)/(?P<id>[0-9a-z]{6})'
  5. _FEED_URL = 'http://comedycentral.com/feeds/mrss/'
  6. _TESTS = [{
  7. 'url': 'http://www.cc.com/video-clips/5ke9v2/the-daily-show-with-trevor-noah-doc-rivers-and-steve-ballmer---the-nba-player-strike',
  8. 'md5': 'b8acb347177c680ff18a292aa2166f80',
  9. 'info_dict': {
  10. 'id': '89ccc86e-1b02-4f83-b0c9-1d9592ecd025',
  11. 'ext': 'mp4',
  12. 'title': 'The Daily Show with Trevor Noah|August 28, 2020|25|25149|Doc Rivers and Steve Ballmer - The NBA Player Strike',
  13. 'description': 'md5:5334307c433892b85f4f5e5ac9ef7498',
  14. 'timestamp': 1598670000,
  15. 'upload_date': '20200829',
  16. },
  17. }, {
  18. 'url': 'http://www.cc.com/episodes/pnzzci/drawn-together--american-idol--parody-clip-show-season-3-ep-314',
  19. 'only_matching': True,
  20. }, {
  21. 'url': 'https://www.cc.com/video/k3sdvm/the-daily-show-with-jon-stewart-exclusive-the-fourth-estate',
  22. 'only_matching': True,
  23. }]
  24. class ComedyCentralTVIE(MTVServicesInfoExtractor):
  25. _VALID_URL = r'https?://(?:www\.)?comedycentral\.tv/folgen/(?P<id>[0-9a-z]{6})'
  26. _TESTS = [{
  27. 'url': 'https://www.comedycentral.tv/folgen/pxdpec/josh-investigates-klimawandel-staffel-1-ep-1',
  28. 'info_dict': {
  29. 'id': '15907dc3-ec3c-11e8-a442-0e40cf2fc285',
  30. 'ext': 'mp4',
  31. 'title': 'Josh Investigates',
  32. 'description': 'Steht uns das Ende der Welt bevor?',
  33. },
  34. }]
  35. _FEED_URL = 'http://feeds.mtvnservices.com/od/feed/intl-mrss-player-feed'
  36. _GEO_COUNTRIES = ['DE']
  37. def _get_feed_query(self, uri):
  38. return {
  39. 'accountOverride': 'intl.mtvi.com',
  40. 'arcEp': 'web.cc.tv',
  41. 'ep': 'b9032c3a',
  42. 'imageEp': 'web.cc.tv',
  43. 'mgid': uri,
  44. }