MCPcopy Index your code
hub / github.com/pyload/pyload / extract_function

Method extract_function

module/plugins/hoster/YoutubeCom.py:1048–1056  ·  view source on GitHub ↗
(self, function_name)

Source from the content-addressed store, hash-verified

1046 return obj
1047
1048 def extract_function(self, function_name):
1049 func_m = re.search(r'(?x)(?:function\s+%s|[{;,]\s*%s\s*=\s*function|var\s+%s\s*=\s*function)\s*\((?P<args>[^)]*)\)\s*\{(?P<code>[^}]+)\}'
1050 % (re.escape(function_name), re.escape(function_name), re.escape(function_name)), self.code)
1051 if func_m is None:
1052 raise JSInterpreterError('Could not find JS function %r' % function_name)
1053
1054 argnames = func_m.group('args').split(',')
1055
1056 return self.build_function(argnames, func_m.group('code'))
1057
1058 def call_function(self, function_name, *args):
1059 f = self.extract_function(function_name)

Callers 3

_decrypt_signatureMethod · 0.95
interpret_expressionMethod · 0.95
call_functionMethod · 0.95

Calls 5

build_functionMethod · 0.95
JSInterpreterErrorClass · 0.85
escapeMethod · 0.80
splitMethod · 0.80
searchMethod · 0.45

Tested by

no test coverage detected