newpipe-extractor-js
Version:
JavaScript/Node.js port of NewPipeExtractor
25 lines • 1.08 kB
TypeScript
export declare class YoutubeSignatureDecryptor {
private playerCache;
private signatureFunctionCache;
private throttlingFunctionCache;
private cachedSignatureTimestamp;
private readonly USER_AGENT;
private static readonly FUNCTION_REGEXES;
private static readonly STS_REGEX;
private static readonly THROTTLING_PARAM_REGEX;
decryptSignature(cipher: string, playerResponse: any): Promise<string | null>;
deobfuscateSignature(obfuscatedSignature: string, playerResponse: any): Promise<string>;
getSignatureTimestamp(playerResponse: any): Promise<number>;
deobfuscateThrottlingParameter(url: string, playerResponse: any): Promise<string>;
private parseCipherString;
private getPlayerJsCode;
private extractPlayerUrlFromMainPage;
private executeSignatureDecryption;
private extractSignatureFunctionName;
private extractTransformationPlan;
private applySignatureTransforms;
private getNestedValue;
private generateCacheKey;
clearCache(): void;
}
//# sourceMappingURL=YoutubeSignatureDecryptor.d.ts.map