mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	[jsinterp] Fix extract_object (#13580)
				
					
				
			Fixes sig extraction for YouTube player `e12fbea4` Authored by: seproDev
This commit is contained in:
		| @@ -478,6 +478,10 @@ class TestJSInterpreter(unittest.TestCase): | ||||
|         func = jsi.extract_function('c', {'e': 10}, {'f': 100, 'g': 1000}) | ||||
|         self.assertEqual(func([1]), 1111) | ||||
| 
 | ||||
|     def test_extract_object(self): | ||||
|         jsi = JSInterpreter('var a={};a.xy={};var xy;var zxy={};xy={z:function(){return "abc"}};') | ||||
|         self.assertTrue('z' in jsi.extract_object('xy', None)) | ||||
| 
 | ||||
|     def test_increment_decrement(self): | ||||
|         self._test('function f() { var x = 1; return ++x; }', 2) | ||||
|         self._test('function f() { var x = 1; return x++; }', 1) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 sepro
					sepro