[CHANGE] Testing js runtime script
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using DotBased.Logging;
|
||||
using DotBased.Monads;
|
||||
using Manager.YouTube.Interpreter;
|
||||
using Manager.YouTube.Models;
|
||||
using Manager.YouTube.Models.Innertube;
|
||||
using Manager.YouTube.Parsers;
|
||||
@@ -401,18 +402,28 @@ public sealed class YouTubeClient : IDisposable
|
||||
_logger.Debug("Skipping decipher, no signatures found to decipher.");
|
||||
return;
|
||||
}
|
||||
|
||||
var jsEngineResult = await JavaScriptEngineManager.GetPlayerEngine(state.PlayerJsUrl ?? "");
|
||||
if (!jsEngineResult.IsSuccess)
|
||||
{
|
||||
_logger.Warning(jsEngineResult.Error?.Description ?? "Failed to get player script engine.");
|
||||
return;
|
||||
}
|
||||
|
||||
var engine = jsEngineResult.Value;
|
||||
engine.InitializePlayer();
|
||||
|
||||
var decipherDecoderResult = await CipherManager.GetDecoderAsync(state, this);
|
||||
/*var decipherDecoderResult = await CipherManager.GetDecoderAsync(state, this);
|
||||
if (!decipherDecoderResult.IsSuccess)
|
||||
{
|
||||
_logger.Warning(decipherDecoderResult.Error?.Description ?? "Failed to get the cipher decoder!");
|
||||
return;
|
||||
}
|
||||
var decoder = decipherDecoderResult.Value;
|
||||
|
||||
|
||||
foreach (var format in formatsWithCipher)
|
||||
{
|
||||
format.Url = decoder.Decipher(format.SignatureCipher);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user