mirror of
				https://code.hackerspace.pl/q3k/youtube-dl
				synced 2025-03-16 11:43:02 +00:00 
			
		
		
		
	[kickstarted] Extract thumbnails in embedded videos (#5929)
This commit is contained in:
		
							parent
							
								
									a55e36f48d
								
							
						
					
					
						commit
						627b964825
					
				| @ -28,6 +28,14 @@ class KickStarterIE(InfoExtractor): | |||||||
|             'uploader': 'Pebble Technology', |             'uploader': 'Pebble Technology', | ||||||
|             'title': 'Pebble iOS Notifications', |             'title': 'Pebble iOS Notifications', | ||||||
|         } |         } | ||||||
|  |     }, { | ||||||
|  |         'url': 'https://www.kickstarter.com/projects/1420158244/power-drive-2000/widget/video.html', | ||||||
|  |         'info_dict': { | ||||||
|  |             'id': '1420158244', | ||||||
|  |             'ext': 'mp4', | ||||||
|  |             'title': 'Power Drive 2000', | ||||||
|  |         }, | ||||||
|  |         'expected_warnings': ['OpenGraph description'], | ||||||
|     }] |     }] | ||||||
| 
 | 
 | ||||||
|     def _real_extract(self, url): |     def _real_extract(self, url): | ||||||
| @ -48,10 +56,15 @@ class KickStarterIE(InfoExtractor): | |||||||
|                 'title': title, |                 'title': title, | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|  |         thumbnail = self._og_search_thumbnail(webpage, default=None) | ||||||
|  |         if thumbnail is None: | ||||||
|  |             thumbnail = self._html_search_regex( | ||||||
|  |                 r'<img[^>]+class="[^"]+\s*poster\s*[^"]+"[^>]+src="([^"]+)"', | ||||||
|  |                 webpage, 'thumbnail image', fatal=False) | ||||||
|         return { |         return { | ||||||
|             'id': video_id, |             'id': video_id, | ||||||
|             'url': video_url, |             'url': video_url, | ||||||
|             'title': title, |             'title': title, | ||||||
|             'description': self._og_search_description(webpage), |             'description': self._og_search_description(webpage), | ||||||
|             'thumbnail': self._og_search_thumbnail(webpage), |             'thumbnail': thumbnail, | ||||||
|         } |         } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Yen Chi Hsuan
						Yen Chi Hsuan