[comcarcoff] don not depend on crackle extractor(closes #8995)
previously extraction has been delegated to crackle to extract more info and subtitles #6106 but some of the episodes can't be extracted using crackle #8995.
This commit is contained in:
		
							parent
							
								
									607619bc90
								
							
						
					
					
						commit
						6e359a1534
					
				| @ -41,7 +41,13 @@ class ComCarCoffIE(InfoExtractor): | |||||||
| 
 | 
 | ||||||
|         display_id = full_data['activeVideo']['video'] |         display_id = full_data['activeVideo']['video'] | ||||||
|         video_data = full_data.get('videos', {}).get(display_id) or full_data['singleshots'][display_id] |         video_data = full_data.get('videos', {}).get(display_id) or full_data['singleshots'][display_id] | ||||||
|  | 
 | ||||||
|         video_id = compat_str(video_data['mediaId']) |         video_id = compat_str(video_data['mediaId']) | ||||||
|  |         title = video_data['title'] | ||||||
|  |         formats = self._extract_m3u8_formats( | ||||||
|  |             video_data['mediaUrl'], video_id, 'mp4') | ||||||
|  |         self._sort_formats(formats) | ||||||
|  | 
 | ||||||
|         thumbnails = [{ |         thumbnails = [{ | ||||||
|             'url': video_data['images']['thumb'], |             'url': video_data['images']['thumb'], | ||||||
|         }, { |         }, { | ||||||
| @ -54,15 +60,14 @@ class ComCarCoffIE(InfoExtractor): | |||||||
|             video_data.get('duration')) |             video_data.get('duration')) | ||||||
| 
 | 
 | ||||||
|         return { |         return { | ||||||
|             '_type': 'url_transparent', |  | ||||||
|             'url': 'crackle:%s' % video_id, |  | ||||||
|             'id': video_id, |             'id': video_id, | ||||||
|             'display_id': display_id, |             'display_id': display_id, | ||||||
|             'title': video_data['title'], |             'title': title, | ||||||
|             'description': video_data.get('description'), |             'description': video_data.get('description'), | ||||||
|             'timestamp': timestamp, |             'timestamp': timestamp, | ||||||
|             'duration': duration, |             'duration': duration, | ||||||
|             'thumbnails': thumbnails, |             'thumbnails': thumbnails, | ||||||
|  |             'formats': formats, | ||||||
|             'season_number': int_or_none(video_data.get('season')), |             'season_number': int_or_none(video_data.get('season')), | ||||||
|             'episode_number': int_or_none(video_data.get('episode')), |             'episode_number': int_or_none(video_data.get('episode')), | ||||||
|             'webpage_url': 'http://comediansincarsgettingcoffee.com/%s' % (video_data.get('urlSlug', video_data.get('slug'))), |             'webpage_url': 'http://comediansincarsgettingcoffee.com/%s' % (video_data.get('urlSlug', video_data.get('slug'))), | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user