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