mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 14:45:14 +00:00 
			
		
		
		
	[ntvde] Add new extractor (Fixes #4850)
This commit is contained in:
		| @@ -238,6 +238,8 @@ class TestUtil(unittest.TestCase): | ||||
|         self.assertEqual(parse_duration('5 s'), 5) | ||||
|         self.assertEqual(parse_duration('3 min'), 180) | ||||
|         self.assertEqual(parse_duration('2.5 hours'), 9000) | ||||
|         self.assertEqual(parse_duration('02:03:04'), 7384) | ||||
|         self.assertEqual(parse_duration('01:02:03:04'), 93784) | ||||
|  | ||||
|     def test_fix_xml_ampersands(self): | ||||
|         self.assertEqual( | ||||
| @@ -371,6 +373,16 @@ class TestUtil(unittest.TestCase): | ||||
|         on = js_to_json('{"abc": true}') | ||||
|         self.assertEqual(json.loads(on), {'abc': True}) | ||||
|  | ||||
|         # Ignore JavaScript code as well | ||||
|         on = js_to_json('''{ | ||||
|             "x": 1, | ||||
|             y: "a", | ||||
|             z: some.code | ||||
|         }''') | ||||
|         d = json.loads(on) | ||||
|         self.assertEqual(d['x'], 1) | ||||
|         self.assertEqual(d['y'], 'a') | ||||
|  | ||||
|     def test_clean_html(self): | ||||
|         self.assertEqual(clean_html('a:\nb'), 'a: b') | ||||
|         self.assertEqual(clean_html('a:\n   "b"'), 'a:    "b"') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user