mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-30 22:25:19 +00:00 
			
		
		
		
	[generic] Make sure Wistia embed URLs contain the protocol (Closes #3977)
Also, improve detection (Addresses #3662)
This commit is contained in:
		| @@ -654,15 +654,17 @@ class GenericIE(InfoExtractor): | |||||||
|         match = re.search( |         match = re.search( | ||||||
|             r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:fast\.)?wistia\.net/embed/iframe/.+?)\1', webpage) |             r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:fast\.)?wistia\.net/embed/iframe/.+?)\1', webpage) | ||||||
|         if match: |         if match: | ||||||
|  |             embed_url = self._proto_relative_url( | ||||||
|  |                 unescapeHTML(match.group('url'))) | ||||||
|             return { |             return { | ||||||
|                 '_type': 'url_transparent', |                 '_type': 'url_transparent', | ||||||
|                 'url': unescapeHTML(match.group('url')), |                 'url': embed_url, | ||||||
|                 'ie_key': 'Wistia', |                 'ie_key': 'Wistia', | ||||||
|                 'uploader': video_uploader, |                 'uploader': video_uploader, | ||||||
|                 'title': video_title, |                 'title': video_title, | ||||||
|                 'id': video_id, |                 'id': video_id, | ||||||
|             } |             } | ||||||
|         match = re.search(r'(?:id=["\']wistia_|data-wistiaid=["\']|Wistia\.embed\(["\'])(?P<id>[^"\']+)', webpage) |         match = re.search(r'(?:id=["\']wistia_|data-wistia-?id=["\']|Wistia\.embed\(["\'])(?P<id>[^"\']+)', webpage) | ||||||
|         if match: |         if match: | ||||||
|             return { |             return { | ||||||
|                 '_type': 'url_transparent', |                 '_type': 'url_transparent', | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Naglis Jonaitis
					Naglis Jonaitis