4 from .common import InfoExtractor
5 from ..utils import parse_iso8601
8 class ComCarCoffIE(InfoExtractor):
9 _VALID_URL = r'http://(?: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)
29 display_id = 'comediansincarsgettingcoffee.com'
30 webpage = self._download_webpage(url, display_id)
32 full_data = json.loads(self._search_regex(
33 r'<script type="application/json" id="videoData">(?P<json>.+?)</script>',
34 webpage, 'full data json'))
36 video_id = full_data['activeVideo']['video']
37 video_data = full_data['videos'][video_id]
39 'url': video_data['images']['thumb'],
41 'url': video_data['images']['poster'],
43 formats = self._extract_m3u8_formats(
44 video_data['mediaUrl'], video_id, ext='mp4')
48 'display_id': display_id,
49 'title': video_data['title'],
50 'description': video_data.get('description'),
51 'timestamp': parse_iso8601(video_data.get('pubDate')),
52 'thumbnails': thumbnails,