w55Movie 修复
This commit is contained in:
parent
e0030d53d4
commit
1ff9e6ecef
|
|
@ -31,7 +31,7 @@ import java.util.regex.Pattern;
|
|||
|
||||
public class QxiTv extends Spider {
|
||||
|
||||
private static final String siteUrl = "https://7xi.tv";
|
||||
private static final String siteUrl = "https://www.7xi.tv";
|
||||
private static final String cateUrl = siteUrl + "/index.php/api/vod";
|
||||
private static final String detailUrl = siteUrl + "/voddetail/";
|
||||
private static final String searchUrl = siteUrl + "/vodsearch/page/1/wd/";
|
||||
|
|
|
|||
|
|
@ -206,12 +206,12 @@ public class W55Movie extends Spider {
|
|||
url = matcher.group(1);
|
||||
url_next = matcher.group(2);
|
||||
}
|
||||
String encrytStr = "{\"url\":\"" + url + "\",\"next_url\":\"" + url_next + "\"}";
|
||||
String encrytStr =url;// "{\"url\":\"" + url + "\",\"next_url\":\"" + url_next + "\"}";
|
||||
// 加密
|
||||
String encrypt = AESEncryption.encrypt(encrytStr);
|
||||
String encodeURI = AESEncryption.encodeURIComponent(encrypt);
|
||||
// 请求获取url
|
||||
String data = OkHttp.string("https://player.ddzyku.com:3653/getUrls?data=" + encodeURI);
|
||||
String data = OkHttp.string("https://player.ddzyku.com:3653/get_url_v2?data=" + encodeURI);
|
||||
// 解密
|
||||
String decrypted = AESEncryption.decrypt(data);
|
||||
Gson gson = new Gson();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import android.util.Base64;
|
|||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
|
|
@ -61,8 +60,7 @@ public class AESEncryption {
|
|||
byte[] data = new byte[len / 2];
|
||||
|
||||
for (int i = 0; i < len; i += 2) {
|
||||
data[i / 2] = (byte) ((Character.digit(hexString.charAt(i), 16) << 4)
|
||||
+ Character.digit(hexString.charAt(i + 1), 16));
|
||||
data[i / 2] = (byte) ((Character.digit(hexString.charAt(i), 16) << 4) + Character.digit(hexString.charAt(i + 1), 16));
|
||||
}
|
||||
|
||||
return data;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,95 @@
|
|||
import android.app.Application;
|
||||
|
||||
import com.github.catvod.spider.Init;
|
||||
import com.github.catvod.spider.W55Movie;
|
||||
import com.github.catvod.utils.Json;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class DaGongRenTest {
|
||||
// @Mock
|
||||
private Application mockContext;
|
||||
|
||||
private W55Movie spider;
|
||||
|
||||
@org.junit.Before
|
||||
public void setUp() throws Exception {
|
||||
mockContext = RuntimeEnvironment.application;
|
||||
Init.init(mockContext);
|
||||
spider = new W55Movie();
|
||||
spider.init(mockContext, "");
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void homeContent() throws Exception {
|
||||
String content = spider.homeContent(true);
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
|
||||
System.out.println("homeContent--" + gson.toJson(map));
|
||||
|
||||
//Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void homeVideoContent() throws Exception {
|
||||
String content = spider.homeVideoContent();
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
|
||||
System.out.println("homeVideoContent--" + gson.toJson(map));
|
||||
|
||||
//Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void categoryContent() throws Exception {
|
||||
String content = spider.categoryContent("/vodshow/1", "2", true, null);
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
System.out.println("categoryContent--" + gson.toJson(map));
|
||||
Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void detailContent() throws Exception {
|
||||
|
||||
String content = spider.detailContent(Arrays.asList("472585.html"));
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
System.out.println("detailContent--" + gson.toJson(map));
|
||||
Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void playerContent() throws Exception {
|
||||
String froms = "极速线路11$$$极速线路31$$$极速线路41$$$备用高清11$$$备用高清21$$$极速线路21$$$蓝光专享31$$$蓝光专享51$$$555蓝光1$$$蓝光专享41";
|
||||
String urls = "HD中字$472585-2-1.html$$$正片$472585-7-1.html$$$HD$472585-3-1.html$$$HD$472585-4-1.html$$$正片$472585-6-1.html$$$HD$472585-5-1.html$$$正片$472585-8-1.html$$$正片$472585-10-1.html$$$预告片$472585-1-1.html$$$正片$472585-9-1.html";
|
||||
for (int i = 0; i < urls.split("\\$\\$\\$").length; i++) {
|
||||
String content = spider.playerContent(froms.split("\\$\\$\\$")[i], urls.split("\\$\\$\\$")[i].split("\\$")[1], new ArrayList<>());
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
System.out.println("playerContent--" + gson.toJson(map));
|
||||
Assert.assertFalse(map.getAsJsonPrimitive("url").getAsString().isEmpty());
|
||||
}
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void searchContent() throws Exception {
|
||||
String content = spider.searchContent("红海", false);
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
System.out.println("searchContent--" + gson.toJson(map));
|
||||
Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
import android.app.Application;
|
||||
|
||||
import com.github.catvod.spider.Init;
|
||||
import com.github.catvod.spider.QxiTv;
|
||||
import com.github.catvod.spider.TvDy;
|
||||
import com.github.catvod.utils.Json;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class QxiTvTest {
|
||||
// @Mock
|
||||
private Application mockContext;
|
||||
|
||||
private QxiTv spider;
|
||||
|
||||
@org.junit.Before
|
||||
public void setUp() throws Exception {
|
||||
mockContext = RuntimeEnvironment.application;
|
||||
Init.init(mockContext);
|
||||
spider = new QxiTv();
|
||||
spider.init(mockContext, "");
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void homeContent() throws Exception {
|
||||
String content = spider.homeContent(true);
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
|
||||
System.out.println("homeContent--" + gson.toJson(map));
|
||||
|
||||
//Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void homeVideoContent() throws Exception {
|
||||
String content = spider.homeVideoContent();
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
|
||||
System.out.println("homeVideoContent--" + gson.toJson(map));
|
||||
|
||||
//Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void categoryContent() throws Exception {
|
||||
String content = spider.categoryContent("1", "2", true, null);
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
System.out.println("categoryContent--" + gson.toJson(map));
|
||||
Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void detailContent() throws Exception {
|
||||
|
||||
String content = spider.detailContent(Arrays.asList("index126780.html"));
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
System.out.println("detailContent--" + gson.toJson(map));
|
||||
Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void playerContent() throws Exception {
|
||||
String content = spider.playerContent("", "126780-0-0.html", new ArrayList<>());
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
System.out.println("playerContent--" + gson.toJson(map));
|
||||
Assert.assertFalse(map.getAsJsonPrimitive("url").getAsString().isEmpty());
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void searchContent() throws Exception {
|
||||
String content = spider.searchContent("红海", false);
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
System.out.println("searchContent--" + gson.toJson(map));
|
||||
Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
import android.app.Application;
|
||||
|
||||
import com.github.catvod.spider.Init;
|
||||
import com.github.catvod.spider.QxiTv;
|
||||
import com.github.catvod.spider.W55Movie;
|
||||
import com.github.catvod.utils.Json;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class W55MovieTest {
|
||||
// @Mock
|
||||
private Application mockContext;
|
||||
|
||||
private W55Movie spider;
|
||||
|
||||
@org.junit.Before
|
||||
public void setUp() throws Exception {
|
||||
mockContext = RuntimeEnvironment.application;
|
||||
Init.init(mockContext);
|
||||
spider = new W55Movie();
|
||||
spider.init(mockContext, "");
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void homeContent() throws Exception {
|
||||
String content = spider.homeContent(true);
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
|
||||
System.out.println("homeContent--" + gson.toJson(map));
|
||||
|
||||
//Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void homeVideoContent() throws Exception {
|
||||
String content = spider.homeVideoContent();
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
|
||||
System.out.println("homeVideoContent--" + gson.toJson(map));
|
||||
|
||||
//Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void categoryContent() throws Exception {
|
||||
String content = spider.categoryContent("/vodshow/1", "2", true, null);
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
System.out.println("categoryContent--" + gson.toJson(map));
|
||||
Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void detailContent() throws Exception {
|
||||
|
||||
String content = spider.detailContent(Arrays.asList("472585.html"));
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
System.out.println("detailContent--" + gson.toJson(map));
|
||||
Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void playerContent() throws Exception {
|
||||
String froms = "极速线路11$$$极速线路31$$$极速线路41$$$备用高清11$$$备用高清21$$$极速线路21$$$蓝光专享31$$$蓝光专享51$$$555蓝光1$$$蓝光专享41";
|
||||
String urls = "HD中字$472585-2-1.html$$$正片$472585-7-1.html$$$HD$472585-3-1.html$$$HD$472585-4-1.html$$$正片$472585-6-1.html$$$HD$472585-5-1.html$$$正片$472585-8-1.html$$$正片$472585-10-1.html$$$预告片$472585-1-1.html$$$正片$472585-9-1.html";
|
||||
for (int i = 0; i < urls.split("\\$\\$\\$").length; i++) {
|
||||
String content = spider.playerContent(froms.split("\\$\\$\\$")[i], urls.split("\\$\\$\\$")[i].split("\\$")[1], new ArrayList<>());
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
System.out.println("playerContent--" + gson.toJson(map));
|
||||
Assert.assertFalse(map.getAsJsonPrimitive("url").getAsString().isEmpty());
|
||||
}
|
||||
}
|
||||
|
||||
@org.junit.Test
|
||||
public void searchContent() throws Exception {
|
||||
String content = spider.searchContent("红海", false);
|
||||
JsonObject map = Json.safeObject(content);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
System.out.println("searchContent--" + gson.toJson(map));
|
||||
Assert.assertFalse(map.getAsJsonArray("list").isEmpty());
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
9b75d7c15ea175b9ea9b6b63e676ce99
|
||||
b39aef6dd7ae29b2c284dff5718814b9
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;9b75d7c15ea175b9ea9b6b63e676ce99",
|
||||
"spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;b39aef6dd7ae29b2c284dff5718814b9",
|
||||
"lives": [
|
||||
{
|
||||
"name": "直播ipv6",
|
||||
|
|
@ -70,14 +70,7 @@
|
|||
"searchable": 1,
|
||||
"filterable": 1
|
||||
},
|
||||
{
|
||||
"key": "QxiTv",
|
||||
"name": "\uD83E\uDD70 7喜 | 影视",
|
||||
"type": 3,
|
||||
"api": "csp_QxiTv",
|
||||
"searchable": 1,
|
||||
"filterable": 1
|
||||
},
|
||||
|
||||
{
|
||||
"key": "W55Movie",
|
||||
"name": "\uD83C\uDF9E\uFE0F 555电影 | 搜索×",
|
||||
|
|
@ -159,6 +152,13 @@
|
|||
"api": "./js/ikanbot.js",
|
||||
"timeout": 30,
|
||||
"ext": "{\"box\": \"TVBox\", \"danmu\": false}"
|
||||
}, {
|
||||
"key": "QxiTv",
|
||||
"name": "\uD83E\uDD70 7喜 | 影视(不稳定)",
|
||||
"type": 3,
|
||||
"api": "csp_QxiTv",
|
||||
"searchable": 1,
|
||||
"filterable": 1
|
||||
}
|
||||
],
|
||||
"parses": [
|
||||
|
|
|
|||
Loading…
Reference in New Issue