mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 14:45:14 +00:00 
			
		
		
		
	[generic] Support Wordpress "YouTube Video Importer" plugin
Closes #9938
This commit is contained in:
		| @@ -1279,7 +1279,19 @@ class GenericIE(InfoExtractor): | |||||||
|                 'ext': 'mp4', |                 'ext': 'mp4', | ||||||
|                 'title': 'Facebook video #10153467542406923', |                 'title': 'Facebook video #10153467542406923', | ||||||
|             }, |             }, | ||||||
|         } |         }, | ||||||
|  |         # Wordpress "YouTube Video Importer" plugin | ||||||
|  |         { | ||||||
|  |             'url': 'http://www.lothype.com/blue-devils-drumline-stanford-lot-2016/', | ||||||
|  |             'info_dict': { | ||||||
|  |                 'id': 'HNTXWDXV9Is', | ||||||
|  |                 'ext': 'mp4', | ||||||
|  |                 'title': 'Blue Devils Drumline Stanford lot 2016', | ||||||
|  |                 'upload_date': '20160627', | ||||||
|  |                 'uploader_id': 'GENOCIDE8GENERAL10', | ||||||
|  |                 'uploader': 'cylus cyrus', | ||||||
|  |             }, | ||||||
|  |         }, | ||||||
|     ] |     ] | ||||||
|  |  | ||||||
|     def report_following_redirect(self, new_url): |     def report_following_redirect(self, new_url): | ||||||
| @@ -1636,6 +1648,13 @@ class GenericIE(InfoExtractor): | |||||||
|         if matches: |         if matches: | ||||||
|             return _playlist_from_matches(matches, lambda m: unescapeHTML(m)) |             return _playlist_from_matches(matches, lambda m: unescapeHTML(m)) | ||||||
|  |  | ||||||
|  |         # Look for Wordpress "YouTube Video Importer" plugin | ||||||
|  |         matches = re.findall(r'''(?x)<div[^>]+ | ||||||
|  |             class=(?P<q1>[\'"])[^\'"]*\byvii_single_video_player\b[^\'"]*(?P=q1)[^>]+ | ||||||
|  |             data-video_id=(?P<q2>[\'"])([^\'"]+)(?P=q2)''', webpage) | ||||||
|  |         if matches: | ||||||
|  |             return _playlist_from_matches(matches, lambda m: m[-1]) | ||||||
|  |  | ||||||
|         # Look for embedded Dailymotion player |         # Look for embedded Dailymotion player | ||||||
|         matches = re.findall( |         matches = re.findall( | ||||||
|             r'<(?:(?:embed|iframe)[^>]+?src=|input[^>]+id=[\'"]dmcloudUrlEmissionSelect[\'"][^>]+value=)(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.com/(?:embed|swf)/video/.+?)\1', webpage) |             r'<(?:(?:embed|iframe)[^>]+?src=|input[^>]+id=[\'"]dmcloudUrlEmissionSelect[\'"][^>]+value=)(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.com/(?:embed|swf)/video/.+?)\1', webpage) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Yen Chi Hsuan
					Yen Chi Hsuan