天翼bug

This commit is contained in:
“lushunming” 2025-04-21 20:22:02 +08:00
parent 105ea7483d
commit 8c5f60089f
4 changed files with 7 additions and 10 deletions

View File

@ -52,7 +52,7 @@ public class TianyiApi {
JsonObject obj = Json.safeObject(token); JsonObject obj = Json.safeObject(token);
//初始化CookieJar //初始化CookieJar
if (Objects.nonNull(obj)) { if (Objects.nonNull(obj)) {
//TODO tianYiHandler.setCookie(obj); tianYiHandler.setCookie(obj);
} }
} }
if (cookieJar.getCookieStore().size() == 0) { if (cookieJar.getCookieStore().size() == 0) {
@ -69,6 +69,7 @@ public class TianyiApi {
headers.put("Content-Type", "application/x-www-form-urlencoded"); headers.put("Content-Type", "application/x-www-form-urlencoded");
headers.put("accept", "application/json;charset=UTF-8"); headers.put("accept", "application/json;charset=UTF-8");
headers.put("cookie", cookieJar.loadForRequest("https://cloud.189.cn/api/portal/getNewVlcVideoPlayUrl.action"));
if (StringUtils.isNotBlank(sessionKey)) { if (StringUtils.isNotBlank(sessionKey)) {
headers.put("sessionKey", sessionKey); headers.put("sessionKey", sessionKey);
@ -142,13 +143,9 @@ public class TianyiApi {
Map<String, String> header = getHeaders(); Map<String, String> header = getHeaders();
header.remove("Host"); header.remove("Host");
header.remove("Content-Type"); header.remove("Content-Type");
List<String> cookies = new ArrayList<>();
for (String s : tianYiHandler.getCookieJar().getCookieStore().keySet()) {
/*TODO for (Cookie cookie : tianYiHandler.getCookieJar().getCookieStore().get(s)) { header.put("Cookie", cookieJar.loadForRequest("https://cloud.189.cn/api/portal/getNewVlcVideoPlayUrl.action"));
cookies.add(cookie.name() + "=" + cookie.value());
}*/
}
header.put("Cookie", TextUtils.join(";", cookies));
return Result.get().url(ProxyVideo.buildCommonProxyUrl(playUrl, header)).octet().header(header).string(); return Result.get().url(ProxyVideo.buildCommonProxyUrl(playUrl, header)).octet().header(header).string();
} }

Binary file not shown.

View File

@ -1 +1 @@
96e8d5ba3acee73adb749270ccb9b5b9 46b02195352aa181391b22db4590ffc4

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;96e8d5ba3acee73adb749270ccb9b5b9", "spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;46b02195352aa181391b22db4590ffc4",
"lives": [ "lives": [
{ {
"name": "电视直播", "name": "电视直播",