删除代码
This commit is contained in:
parent
4fb678c4bf
commit
28a473a084
|
|
@ -1,97 +0,0 @@
|
||||||
import android.app.Application;
|
|
||||||
|
|
||||||
import com.github.catvod.spider.DaGongRen;
|
|
||||||
import com.github.catvod.spider.Init;
|
|
||||||
import com.github.catvod.spider.Supjav;
|
|
||||||
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 SupjavTest {
|
|
||||||
// @Mock
|
|
||||||
private Application mockContext;
|
|
||||||
|
|
||||||
private Supjav spider;
|
|
||||||
|
|
||||||
@org.junit.Before
|
|
||||||
public void setUp() throws Exception {
|
|
||||||
mockContext = RuntimeEnvironment.application;
|
|
||||||
Init.init(mockContext);
|
|
||||||
spider = new Supjav();
|
|
||||||
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("popular", "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("288706.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 = "FST$$$ST$$$VOE";
|
|
||||||
String urls = "播放$7a39ff703f95e9c01ee6785def2cf624c8636748c26ab4afa219d49d98b7c77ebef268d993e34f9763bc07b2d690fb8d40ec53eb3cf4f17270830acf091765df$$$播放$a8a52ce3124daf8525aeaae8faf1a45e1e74d8b6e1b0db2ee59510d9a238d462be957d62dd34d708391cc6d394bc3bf326eeca43de00d2967a95ac96a12a3b94549b8fd2edab26b7049e1116b32c18c9$$$播放$0a38bff9ae3e860ff7cc5a760f2edd22604306efa019bf6d0adb9874e35d33b8a50955ac4154f2c25c073f23277513045b8c9b26fdfbb54fef4cad7eaf8a6b32"
|
|
||||||
;
|
|
||||||
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("fc", 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());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -18,7 +18,7 @@ public class ProxyVideoTest {
|
||||||
// "https://js.shipin520.com/pc/images/new/banner20250225.mp4", new HashMap<>());
|
// "https://js.shipin520.com/pc/images/new/banner20250225.mp4", new HashMap<>());
|
||||||
"http://172.16.1.217:18089/ng-grid/video.mp4", new HashMap<>());
|
"http://172.16.1.217:18089/ng-grid/video.mp4", new HashMap<>());
|
||||||
System.out.println(url);*/
|
System.out.println(url);*/
|
||||||
System.out.println(ProxyServer.INSTANCE.buildProxyUrl("https://media.w3.org/2010/05/sintel/trailer.mp4", Map.of("header","2","header2","2")));
|
System.out.println(ProxyServer.INSTANCE.buildProxyUrl("http://172.16.1.217:18089/ng-grid/video.mp4", Map.of("header","2","header2","2")));
|
||||||
ProxyServer.INSTANCE.start();
|
ProxyServer.INSTANCE.start();
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
|
||||||
BIN
jar/GM.jar
BIN
jar/GM.jar
Binary file not shown.
7668
jar/GM.jobf
7668
jar/GM.jobf
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
0d7c789273db84a811d5e2ddad6b1988
|
80184a064a1723edd4e948b4784eed17
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://andoridspidermt.netlify.app/jar/custom_spider.jar;md5;0d7c789273db84a811d5e2ddad6b1988",
|
"spider": "https://andoridspidermt.netlify.app/jar/custom_spider.jar;md5;80184a064a1723edd4e948b4784eed17",
|
||||||
"lives": [
|
"lives": [
|
||||||
{
|
{
|
||||||
"name": "电视直播",
|
"name": "电视直播",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue