mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-28 09:19:40 -05:00
Compare commits
7 Commits
develop-1.
...
1.9.1-Rele
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b6b381e31 | ||
|
|
86a79d687e | ||
|
|
65a651d4b8 | ||
|
|
8bda5d789c | ||
|
|
81fb2b4576 | ||
|
|
64b2e74d2b | ||
|
|
8a1f3255d0 |
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<version>1.8.14-Release</version>
|
||||
<version>1.9.0-Release</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>API</artifactId>
|
||||
|
||||
@@ -153,8 +153,8 @@ public class LiveClientSettings {
|
||||
clientParams.put("screen_height", 1152);
|
||||
clientParams.put("screen_width", 2048);
|
||||
clientParams.put("tz_name", "Europe/Berlin");
|
||||
clientParams.put("referer", "https, //www.tiktok.com/");
|
||||
clientParams.put("root_referer", "https, //www.tiktok.com/");
|
||||
clientParams.put("referer", "https://www.tiktok.com/");
|
||||
clientParams.put("root_referer", "https://www.tiktok.com/");
|
||||
clientParams.put("msToken", "");
|
||||
clientParams.put("version_code", 180800);
|
||||
clientParams.put("webcast_sdk_version", "1.3.0");
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<version>1.8.14-Release</version>
|
||||
<version>1.9.0-Release</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -103,6 +103,10 @@ public class HttpClient {
|
||||
var requestBuilder = HttpRequest.newBuilder().GET();
|
||||
requestBuilder.uri(toUri());
|
||||
requestBuilder.timeout(httpClientSettings.getTimeout());
|
||||
if (!httpClientSettings.getCookies().isEmpty()) {
|
||||
String cookieString = httpClientSettings.getCookies().entrySet().stream().map(e -> e.getKey()+"="+e.getValue()).collect(Collectors.joining("; "));
|
||||
httpClientSettings.getHeaders().put("Cookie", cookieString);
|
||||
}
|
||||
httpClientSettings.getHeaders().forEach(requestBuilder::setHeader);
|
||||
|
||||
httpClientSettings.getOnRequestCreating().accept(requestBuilder);
|
||||
|
||||
@@ -53,6 +53,7 @@ public class HttpClientBuilder {
|
||||
}
|
||||
|
||||
public HttpClientBuilder withCookie(String name, String value) {
|
||||
if (name != null && value != null)
|
||||
httpClientSettings.getCookies().put(name, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ Maven
|
||||
<dependency>
|
||||
<groupId>com.github.jwdeveloper.TikTok-Live-Java</groupId>
|
||||
<artifactId>Client</artifactId>
|
||||
<version>1.8.14-Release</version>
|
||||
<version>1.9.1-Release</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -87,7 +87,7 @@ dependencyResolutionManagement {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.jwdeveloper.TikTok-Live-Java:Client:1.8.14-Release'
|
||||
implementation 'com.github.jwdeveloper.TikTok-Live-Java:Client:1.9.1-Release'
|
||||
}
|
||||
```
|
||||
|
||||
@@ -746,7 +746,6 @@ public static class CustomListener {
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<parent>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<version>1.8.14-Release</version>
|
||||
<version>1.9.0-Release</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<version>1.8.14-Release</version>
|
||||
<version>1.9.0-Release</version>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<dependency>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<artifactId>API</artifactId>
|
||||
<version>1.8.14-Release</version>
|
||||
<version>1.9.0-Release</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<version>1.8.14-Release</version>
|
||||
<version>1.9.0-Release</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>extension-recorder</artifactId>
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -7,7 +7,7 @@
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.8.14-Release</version>
|
||||
<version>1.9.0-Release</version>
|
||||
<modules>
|
||||
<module>API</module>
|
||||
<module>Client</module>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>TikTokLiveJava</artifactId>
|
||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||
<version>1.8.14-Release</version>
|
||||
<version>1.9.0-Release</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user