From f10debd7b0312cc1b32470020e9649ad90f8d910 Mon Sep 17 00:00:00 2001 From: Steam Powered Taco Date: Sat, 14 Dec 2024 02:07:52 -0700 Subject: [PATCH] Fixes #103, empty json data for live info. --- TikTokLiveSharp/Client/Config/Constants.cs | 8 +++++--- TikTokLiveSharp/TikTokLiveSharp.csproj | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/TikTokLiveSharp/Client/Config/Constants.cs b/TikTokLiveSharp/Client/Config/Constants.cs index 9208539..d5bd1d9 100644 --- a/TikTokLiveSharp/Client/Config/Constants.cs +++ b/TikTokLiveSharp/Client/Config/Constants.cs @@ -23,8 +23,11 @@ public static class Constants /// /// User-Agent for WebClients (Http/WebSocket) /// - public const string USER_AGENT = "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36"; + public const string USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"; /// + /// Browser version for WebClients parameter (Http/WebSocket) + /// + public const string BROWSER_VERSION = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36";/// /// Default TimeOut for Connections /// public const float DEFAULT_TIMEOUT = 20f; @@ -71,7 +74,7 @@ public static class Constants { "browser_name", "Mozilla" }, { "browser_online", true }, { "browser_platform", "Win32" }, - { "browser_version", USER_AGENT }, + { "browser_version", BROWSER_VERSION }, { "cookie_enabled", true }, { "cursor", "" }, { "internal_ext", "" }, @@ -92,7 +95,6 @@ public static class Constants { "referer", "https, //www.tiktok.com/" }, { "root_referer", "https, //www.tiktok.com/" }, { "msToken", "" }, - { "version_code", 180800 }, { "webcast_sdk_version", "1.3.0" }, { "update_version_code", "1.3.0" } }); diff --git a/TikTokLiveSharp/TikTokLiveSharp.csproj b/TikTokLiveSharp/TikTokLiveSharp.csproj index 0619775..052f424 100644 --- a/TikTokLiveSharp/TikTokLiveSharp.csproj +++ b/TikTokLiveSharp/TikTokLiveSharp.csproj @@ -2,7 +2,7 @@ netstandard2.0 - 1.2.0 + 1.2.1 Frank van Hoof True https://github.com/frankvHoof93/TikTokLiveSharp