4 from .common import InfoExtractor
5 from ..utils import parse_iso8601
8 class ComCarCoffIE(InfoExtractor):
9 _VALID_URL = r'https?://(?:www\.)?comediansincarsgettingcoffee\.com/(?P<id>[a-z0-9\-]+)/?'
11 'url': 'http://comediansincarsgettingcoffee.com/miranda-sings-happy-thanksgiving-miranda/',
13 'id': 'miranda-sings-happy-thanksgiving-miranda',
15 'upload_date': '20141127',
16 'timestamp': 1417107600,
17 'title': 'Happy Thanksgiving Miranda',
18 'description': 'Jerry Seinfeld and his special guest Miranda Sings cruise around town in search of coffee, complaining and apologizing along the way.',
19 'thumbnail': 'http://ccc.crackle.com/images/s5e4_thumb.jpg',
22 'skip_download': 'requires ffmpeg',
26 def _real_extract(self, url):
27 display_id = self._match_id(url)
28 webpage = self._download_webpage(url, display_id)
30 full_data = json.loads(self._search_regex(
31 r'<script type="application/json" id="videoData">(?P<json>.+?)</script>',
32 webpage, 'full data json'))
34 video_id = full_data['activeVideo']['video']
35 video_data = full_data['videos'][video_id]
37 'url': video_data['images']['thumb'],
39 'url': video_data['images']['poster'],
41 formats = self._extract_m3u8_formats(
42 video_data['mediaUrl'], video_id, ext='mp4')
46 'display_id': display_id,
47 'title': video_data['title'],
48 'description': video_data.get('description'),
49 'timestamp': parse_iso8601(video_data.get('pubDate')),
50 'thumbnails': thumbnails,