From 1e44dbe6c1111a8bde5220363401a17090825e09 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Sun, 8 Feb 2026 20:35:44 -0600 Subject: [PATCH] Parse it from Set-Cookie because honestly fuck it --- KfChatDotNetBot/Services/KiwiFlare.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/KfChatDotNetBot/Services/KiwiFlare.cs b/KfChatDotNetBot/Services/KiwiFlare.cs index 60cc93f..5bd2de9 100644 --- a/KfChatDotNetBot/Services/KiwiFlare.cs +++ b/KfChatDotNetBot/Services/KiwiFlare.cs @@ -185,10 +185,10 @@ public class KiwiFlare(string kfDomain, string? proxy = null, CancellationToken? } _logger.Debug($"Set-Cookie header -> {JsonSerializer.Serialize(response.Headers.GetValues("Set-Cookie"))}"); - var cookies = container.GetAllCookies(); - _logger.Debug("JSON serialization of all the cookies"); - _logger.Debug(JsonSerializer.Serialize(cookies)); - return cookies["ttrs_clearance"]?.Value ?? throw new InvalidOperationException(); + var header = response.Headers.GetValues("Set-Cookie").First(); + var token = $"{header.Split("ttrs_clearance=")[1].Split("; ")[0]}"; + _logger.Debug($"Parsed token form the header: {token}"); + return token; } }