打工人 修复
This commit is contained in:
parent
22921eb3e2
commit
918628cb41
|
|
@ -36,6 +36,7 @@ public class DaGongRen extends Spider {
|
||||||
private HashMap<String, String> getHeaders() {
|
private HashMap<String, String> getHeaders() {
|
||||||
HashMap<String, String> headers = new HashMap<>();
|
HashMap<String, String> headers = new HashMap<>();
|
||||||
headers.put("User-Agent", Util.CHROME);
|
headers.put("User-Agent", Util.CHROME);
|
||||||
|
headers.put("Host", "dagongren1.com");
|
||||||
return headers;
|
return headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
|
|
||||||
|
import com.github.catvod.spider.DaGongRen;
|
||||||
import com.github.catvod.spider.Init;
|
import com.github.catvod.spider.Init;
|
||||||
import com.github.catvod.spider.W55Movie;
|
import com.github.catvod.spider.W55Movie;
|
||||||
import com.github.catvod.utils.Json;
|
import com.github.catvod.utils.Json;
|
||||||
|
|
@ -20,13 +21,13 @@ public class DaGongRenTest {
|
||||||
// @Mock
|
// @Mock
|
||||||
private Application mockContext;
|
private Application mockContext;
|
||||||
|
|
||||||
private W55Movie spider;
|
private DaGongRen spider;
|
||||||
|
|
||||||
@org.junit.Before
|
@org.junit.Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
mockContext = RuntimeEnvironment.application;
|
mockContext = RuntimeEnvironment.application;
|
||||||
Init.init(mockContext);
|
Init.init(mockContext);
|
||||||
spider = new W55Movie();
|
spider = new DaGongRen();
|
||||||
spider.init(mockContext, "");
|
spider.init(mockContext, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -54,7 +55,7 @@ public class DaGongRenTest {
|
||||||
|
|
||||||
@org.junit.Test
|
@org.junit.Test
|
||||||
public void categoryContent() throws Exception {
|
public void categoryContent() throws Exception {
|
||||||
String content = spider.categoryContent("/vodshow/1", "2", true, null);
|
String content = spider.categoryContent("dianying", "2", true, null);
|
||||||
JsonObject map = Json.safeObject(content);
|
JsonObject map = Json.safeObject(content);
|
||||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||||
System.out.println("categoryContent--" + gson.toJson(map));
|
System.out.println("categoryContent--" + gson.toJson(map));
|
||||||
|
|
@ -64,7 +65,7 @@ public class DaGongRenTest {
|
||||||
@org.junit.Test
|
@org.junit.Test
|
||||||
public void detailContent() throws Exception {
|
public void detailContent() throws Exception {
|
||||||
|
|
||||||
String content = spider.detailContent(Arrays.asList("472585.html"));
|
String content = spider.detailContent(Arrays.asList("92856-1-1.html"));
|
||||||
JsonObject map = Json.safeObject(content);
|
JsonObject map = Json.safeObject(content);
|
||||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||||
System.out.println("detailContent--" + gson.toJson(map));
|
System.out.println("detailContent--" + gson.toJson(map));
|
||||||
|
|
@ -73,8 +74,8 @@ public class DaGongRenTest {
|
||||||
|
|
||||||
@org.junit.Test
|
@org.junit.Test
|
||||||
public void playerContent() throws Exception {
|
public void playerContent() throws Exception {
|
||||||
String froms = "极速线路11$$$极速线路31$$$极速线路41$$$备用高清11$$$备用高清21$$$极速线路21$$$蓝光专享31$$$蓝光专享51$$$555蓝光1$$$蓝光专享41";
|
String froms = "\uE62F 闪电资源";
|
||||||
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";
|
String urls = "HD$92856-1-1.html";
|
||||||
for (int i = 0; i < urls.split("\\$\\$\\$").length; i++) {
|
for (int i = 0; i < urls.split("\\$\\$\\$").length; i++) {
|
||||||
String content = spider.playerContent(froms.split("\\$\\$\\$")[i], urls.split("\\$\\$\\$")[i].split("\\$")[1], new ArrayList<>());
|
String content = spider.playerContent(froms.split("\\$\\$\\$")[i], urls.split("\\$\\$\\$")[i].split("\\$")[1], new ArrayList<>());
|
||||||
JsonObject map = Json.safeObject(content);
|
JsonObject map = Json.safeObject(content);
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
d1a0394c6756383a9f36cf50d6738e9b
|
14daee5041b18644a7c510121ea5f2c2
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "../jar/custom_spider.jar;md5;d1a0394c6756383a9f36cf50d6738e9b",
|
"spider": "../jar/custom_spider.jar;md5;14daee5041b18644a7c510121ea5f2c2",
|
||||||
"lives": [
|
"lives": [
|
||||||
{
|
{
|
||||||
"name": "直播ipv6",
|
"name": "直播ipv6",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue