mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 00:27:07 -05:00 
			
		
		
		
	[generic] Improve jwplayer detection (Fixes #2731)
This commit is contained in:
		@@ -619,7 +619,13 @@ class GenericIE(InfoExtractor):
 | 
			
		||||
        mobj = re.search(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage)
 | 
			
		||||
        if mobj is None:
 | 
			
		||||
            # Look for gorilla-vid style embedding
 | 
			
		||||
            mobj = re.search(r'(?s)(?:jw_plugins|JWPlayerOptions).*?file\s*:\s*["\'](.*?)["\']', webpage)
 | 
			
		||||
            mobj = re.search(r'''(?sx)
 | 
			
		||||
                (?:
 | 
			
		||||
                    jw_plugins|
 | 
			
		||||
                    JWPlayerOptions|
 | 
			
		||||
                    jwplayer\s*\(\s*["'][^'"]+["']\s*\)\s*\.setup
 | 
			
		||||
                )
 | 
			
		||||
                .*?file\s*:\s*["\'](.*?)["\']''', webpage)
 | 
			
		||||
        if mobj is None:
 | 
			
		||||
            # Broaden the search a little bit
 | 
			
		||||
            mobj = re.search(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user