mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 08:35:12 +00:00 
			
		
		
		
	[cracked] Add support for youtube embeds
This commit is contained in:
		@@ -30,8 +30,15 @@ class CrackedIE(InfoExtractor):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        webpage = self._download_webpage(url, video_id)
 | 
					        webpage = self._download_webpage(url, video_id)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        youtube_url = self._search_regex(
 | 
				
			||||||
 | 
					            r'<iframe[^>]+src="((?:https?:)?//www\.youtube\.com/embed/[^"]+)"',
 | 
				
			||||||
 | 
					            webpage, 'youtube url', default=None)
 | 
				
			||||||
 | 
					        if youtube_url:
 | 
				
			||||||
 | 
					            return self.url_result(youtube_url)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        video_url = self._html_search_regex(
 | 
					        video_url = self._html_search_regex(
 | 
				
			||||||
            [r'var\s+CK_vidSrc\s*=\s*"([^"]+)"', r'<video\s+src="([^"]+)"'], webpage, 'video URL')
 | 
					            [r'var\s+CK_vidSrc\s*=\s*"([^"]+)"', r'<video\s+src="([^"]+)"'],
 | 
				
			||||||
 | 
					            webpage, 'video URL')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        title = self._search_regex(
 | 
					        title = self._search_regex(
 | 
				
			||||||
            [r'property="?og:title"?\s+content="([^"]+)"', r'class="?title"?>([^<]+)'],
 | 
					            [r'property="?og:title"?\s+content="([^"]+)"', r'class="?title"?>([^<]+)'],
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user