mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-28 07:50:34 +05:30
fix formatting
This commit is contained in:
parent
56595bd9d5
commit
68465b27fe
@ -130,7 +130,8 @@ final class YoutubeThrottlingParameterUtils {
|
|||||||
"=\\s*function\\s*\\(\\s*([^)]*)\\s*\\)";
|
"=\\s*function\\s*\\(\\s*([^)]*)\\s*\\)";
|
||||||
|
|
||||||
private static final String EARLY_RETURN_REGEX =
|
private static final String EARLY_RETURN_REGEX =
|
||||||
";\\s*if\\s*\\(\\s*typeof\\s+" + MULTIPLE_CHARS_REGEX + "+\\s*===?\\s*([\"'])undefined\\1\\s*\\)\\s*return\\s+";
|
";\\s*if\\s*\\(\\s*typeof\\s+" + MULTIPLE_CHARS_REGEX
|
||||||
|
+ "+\\s*===?\\s*([\"'])undefined\\1\\s*\\)\\s*return\\s+";
|
||||||
|
|
||||||
private YoutubeThrottlingParameterUtils() {
|
private YoutubeThrottlingParameterUtils() {
|
||||||
}
|
}
|
||||||
@ -206,7 +207,7 @@ final class YoutubeThrottlingParameterUtils {
|
|||||||
// If the throttling parameter could not be parsed from the URL, it means that there is
|
// If the throttling parameter could not be parsed from the URL, it means that there is
|
||||||
// no throttling parameter
|
// no throttling parameter
|
||||||
// Return null in this case
|
// Return null in this case
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,7 +241,9 @@ final class YoutubeThrottlingParameterUtils {
|
|||||||
@Nonnull
|
@Nonnull
|
||||||
private static String fixupFunction(@Nonnull final String function)
|
private static String fixupFunction(@Nonnull final String function)
|
||||||
throws Parser.RegexException {
|
throws Parser.RegexException {
|
||||||
final String firstArgName = Parser.matchGroup1(FUNCTION_ARGUMENTS_REGEX, function).split(",")[0].trim();
|
final String firstArgName = Parser
|
||||||
|
.matchGroup1(FUNCTION_ARGUMENTS_REGEX, function)
|
||||||
|
.split(",")[0].trim();
|
||||||
final Pattern earlyReturnPattern = Pattern.compile(
|
final Pattern earlyReturnPattern = Pattern.compile(
|
||||||
EARLY_RETURN_REGEX + firstArgName + ";",
|
EARLY_RETURN_REGEX + firstArgName + ";",
|
||||||
Pattern.DOTALL);
|
Pattern.DOTALL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user