Fix clientParams and send cookies when present and not null to specific requests for 18+ livestreams.

This commit is contained in:
kohlerpop1
2025-02-14 19:44:32 -05:00
parent 64b2e74d2b
commit 65a651d4b8
4 changed files with 10 additions and 3 deletions

View File

@@ -112,6 +112,7 @@ public class TikTokLiveHttpClient implements LiveHttpClient
var result = httpFactory.client(url)
.withParam("uniqueId", request.getUserName())
.withParam("sourceType", "54") //MAGIC NUMBER, WHAT 54 means?
.withCookie("sessionid", clientSettings.getSessionId())
.build()
.toJsonResponse();
@@ -139,6 +140,7 @@ public class TikTokLiveHttpClient implements LiveHttpClient
var url = TIKTOK_URL_WEBCAST + "room/info";
var result = httpFactory.client(url)
.withParam("room_id", request.getRoomId())
.withCookie("sessionid", clientSettings.getSessionId())
.build()
.toJsonResponse();