mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-30 22:25:19 +00:00 
			
		
		
		
	[extractors] Use new framework for existing embeds (#4307)
`Brightcove` is difficult to migrate because it's subclasses may depend on the signature of the current functions. So it is left as-is for now Note: Tests have not been migrated
This commit is contained in:
		| @@ -331,6 +331,7 @@ class MTVServicesInfoExtractor(InfoExtractor): | ||||
| class MTVServicesEmbeddedIE(MTVServicesInfoExtractor): | ||||
|     IE_NAME = 'mtvservices:embedded' | ||||
|     _VALID_URL = r'https?://media\.mtvnservices\.com/embed/(?P<mgid>.+?)(\?|/|$)' | ||||
|     _EMBED_REGEX = [r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//media\.mtvnservices\.com/embed/.+?)\1'] | ||||
| 
 | ||||
|     _TEST = { | ||||
|         # From http://www.thewrap.com/peter-dinklage-sums-up-game-of-thrones-in-45-seconds-video/ | ||||
| @@ -346,13 +347,6 @@ class MTVServicesEmbeddedIE(MTVServicesInfoExtractor): | ||||
|         }, | ||||
|     } | ||||
| 
 | ||||
|     @staticmethod | ||||
|     def _extract_url(webpage): | ||||
|         mobj = re.search( | ||||
|             r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//media\.mtvnservices\.com/embed/.+?)\1', webpage) | ||||
|         if mobj: | ||||
|             return mobj.group('url') | ||||
| 
 | ||||
|     def _get_feed_url(self, uri, url=None): | ||||
|         video_id = self._id_from_uri(uri) | ||||
|         config = self._download_json( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan