mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-28 07:50:34 +05:30
add comment to throttling parameter deobfuscation function fixup
This commit is contained in:
parent
e0d39b606c
commit
4181625c2c
@ -239,10 +239,20 @@ final class YoutubeThrottlingParameterUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Removes an early return statement from the code of the throttling parameter deobfuscation function.
|
||||||
*
|
*
|
||||||
* @param function
|
* <p>In newer version of the player code the function contains a check for something defined outside of the function.
|
||||||
* @return
|
* If that was not found it will return early.
|
||||||
* @throws Parser.RegexException
|
*
|
||||||
|
* <p>The check can look like this (JS):<br>
|
||||||
|
* if(typeof RUQ==="undefined")return p;
|
||||||
|
*
|
||||||
|
* <p>In this example RUQ will always be undefined when running the function as standalone.
|
||||||
|
* If the check is kept it would just return p which is the input parameter and would be wrong.
|
||||||
|
* For that reason this check and return statement needs to be removed.
|
||||||
|
*
|
||||||
|
* @param function the original throttling parameter deobfuscation function code
|
||||||
|
* @return the throttling parameter deobfuscation function code with the early return statement removed
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
private static String fixupFunction(@Nonnull final String function)
|
private static String fixupFunction(@Nonnull final String function)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user