[CHANGE] Reworked parsers/converters. Decipher operation from script do not work!

This commit is contained in:
max
2025-10-24 00:23:09 +02:00
parent de28591d24
commit a84195aefa
18 changed files with 285 additions and 77 deletions

View File

@@ -175,10 +175,10 @@ public sealed class YouTubeClient : IDisposable
public async Task<Result> RotateCookiesPageAsync(string origin = NetworkService.Origin, int ytPid = 1)
{
if (IsAnonymous)
/*if (IsAnonymous)
{
return ResultError.Fail("Anonymous clients cannot rotate cookies!");
}
}*/
if (string.IsNullOrWhiteSpace(origin))
{
@@ -277,6 +277,12 @@ public sealed class YouTubeClient : IDisposable
return stateResult;
}
if (State is { LoggedIn: false })
{
_logger.Warning("Client is not logged in!");
return ResultError.Fail("Client login failed!");
}
var cookieRotationResult = await RotateCookiesPageAsync();
return !cookieRotationResult.IsSuccess ? cookieRotationResult : Result.Success();
}