Class JavaScriptExtractor
- java.lang.Object
-
- org.schabi.newpipe.extractor.utils.jsextractor.JavaScriptExtractor
-
public final class JavaScriptExtractor extends java.lang.Object
Utility class for extracting functions from JavaScript code.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
matchToClosingBrace(java.lang.String jsCode, java.lang.String start)
Searches the given JavaScript code for the identifier of a function and returns its body.
-
-
-
Method Detail
-
matchToClosingBrace
@Nonnull public static java.lang.String matchToClosingBrace(java.lang.String jsCode, java.lang.String start) throws ParsingException
Searches the given JavaScript code for the identifier of a function and returns its body.- Parameters:
jsCode
- JavaScript codestart
- start of the function (without the opening brace)- Returns:
- extracted code (opening brace + function + closing brace)
- Throws:
ParsingException
-
-