mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-03 19:57:06 -05:00 
			
		
		
		
	[utils] Allow empty attribute values in get_element_by_attribute (Closes #9415)
This commit is contained in:
		@@ -256,9 +256,9 @@ def get_element_by_attribute(attribute, value, html):
 | 
			
		||||
 | 
			
		||||
    m = re.search(r'''(?xs)
 | 
			
		||||
        <([a-zA-Z0-9:._-]+)
 | 
			
		||||
         (?:\s+[a-zA-Z0-9:._-]+(?:=[a-zA-Z0-9:._-]+|="[^"]+"|='[^']+'))*?
 | 
			
		||||
         (?:\s+[a-zA-Z0-9:._-]+(?:=[a-zA-Z0-9:._-]*|="[^"]*"|='[^']*'))*?
 | 
			
		||||
         \s+%s=['"]?%s['"]?
 | 
			
		||||
         (?:\s+[a-zA-Z0-9:._-]+(?:=[a-zA-Z0-9:._-]+|="[^"]+"|='[^']+'))*?
 | 
			
		||||
         (?:\s+[a-zA-Z0-9:._-]+(?:=[a-zA-Z0-9:._-]*|="[^"]*"|='[^']*'))*?
 | 
			
		||||
        \s*>
 | 
			
		||||
        (?P<content>.*?)
 | 
			
		||||
        </\1>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user