mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-30 22:25:19 +00:00 
			
		
		
		
	[utils] Handle HTMLParseError in extract_attributes (closes #13349)
This commit is contained in:
		| @@ -916,6 +916,8 @@ class TestUtil(unittest.TestCase): | ||||
|             supports_outside_bmp = False | ||||
|         if supports_outside_bmp: | ||||
|             self.assertEqual(extract_attributes('<e x="Smile 😀!">'), {'x': 'Smile \U0001f600!'}) | ||||
|         # Malformed HTML should not break attributes extraction on older Python | ||||
|         self.assertEqual(extract_attributes('<mal"formed/>'), {}) | ||||
|  | ||||
|     def test_clean_html(self): | ||||
|         self.assertEqual(clean_html('a:\nb'), 'a: b') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sergey M․
					Sergey M․