5 from .common import InfoExtractor
10 class ComCarCoffIE(InfoExtractor):
11 _VALID_URL = r'https?://(?:www\.)?comediansincarsgettingcoffee\.com/(?P<id>[a-z0-9\-]+)/?'
14 'url': 'http://comediansincarsgettingcoffee.com/miranda-sings-happy-thanksgiving-miranda/',
16 'id': 'miranda-sings-happy-thanksgiving-miranda',
17 'upload_date': '20141127',
18 'title': 'Happy Thanksgiving Miranda',
19 'description': 'Jerry Seinfeld and his special guest Miranda Sings cruise around town in search of coffee, complaining and apologizing along the way.',
20 'thumbnail': 'http://ccc.crackle.com/images/s5e4_thumb.jpg',
25 def _real_extract(self, url):
26 display_id = self._match_id(url)
27 webpage = self._download_webpage(url, display_id)
29 full_data = json.loads(self._search_regex(
30 r'<script type="application/json" id="videoData">(?P<json>.+?)</script>',
33 video_id = full_data['activeVideo']['video']
34 video_data = full_data['videos'][video_id]
38 'display_id': display_id,
39 'title': video_data['title'],
40 'description': video_data['description'],
41 # XXX: the original datum is a full ISO timestamp... why convert it to a worse format?
42 'upload_date': unified_strdate(video_data['pubDate']),
43 'thumbnail': video_data['images']['thumb'],
44 # XXX: what do we do with video_data['images']['poster']?
45 'formats': self._extract_m3u8_formats(video_data['mediaUrl'], video_id),