add - douban bg99
This commit is contained in:
@@ -110,8 +110,9 @@ public class PushAgentQQ extends Spider {
|
|||||||
if (!o.toString().equals("null")) {
|
if (!o.toString().equals("null")) {
|
||||||
o1 = v.getJSONObject("rating");
|
o1 = v.getJSONObject("rating");
|
||||||
remark = o1.optString("value", "暂无评分");
|
remark = o1.optString("value", "暂无评分");
|
||||||
}else remark = "暂无评分";
|
}else {
|
||||||
remark = o1.optString("value", "暂无评分");
|
remark = "暂无评分";
|
||||||
|
}
|
||||||
op1 = v.getJSONObject("pic");
|
op1 = v.getJSONObject("pic");
|
||||||
pic = op1.optString("normal", "");
|
pic = op1.optString("normal", "");
|
||||||
vo.put("vod_id", "");
|
vo.put("vod_id", "");
|
||||||
@@ -132,7 +133,10 @@ public class PushAgentQQ extends Spider {
|
|||||||
Misc.jsonUrl = extend;
|
Misc.jsonUrl = extend;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PushAgent.fetchRule(false, 0);
|
if (Misc.pushAgent == null) {
|
||||||
|
Misc.pushAgent = new PushAgent();
|
||||||
|
Misc.pushAgent.init(context, extend);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -269,13 +273,13 @@ public class PushAgentQQ extends Spider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String detailContent(List<String> list) {
|
public String detailContent(List<String> list) {
|
||||||
return PushAgent.getDetail(list);
|
return Misc.pushAgent.getDetail(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String playerContent(String str, String str2, List<String> list) {
|
public String playerContent(String str, String str2, List<String> list) {
|
||||||
return PushAgent.player(str, str2, list);
|
return Misc.pushAgent.player(str, str2, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -17,7 +17,10 @@ public class Upyunso extends Spider {
|
|||||||
@Override
|
@Override
|
||||||
public void init(Context context, String extend) {
|
public void init(Context context, String extend) {
|
||||||
super.init(context, extend);
|
super.init(context, extend);
|
||||||
PushAgent.fetchRule(false, 0);
|
if (Misc.pushAgent == null) {
|
||||||
|
Misc.pushAgent = new PushAgent();
|
||||||
|
Misc.pushAgent.init(context, extend);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
|||||||
|
|
||||||
import com.github.catvod.crawler.Spider;
|
import com.github.catvod.crawler.Spider;
|
||||||
import com.github.catvod.crawler.SpiderDebug;
|
import com.github.catvod.crawler.SpiderDebug;
|
||||||
|
import com.github.catvod.utils.Misc;
|
||||||
import com.github.catvod.utils.okhttp.OkHttpUtil;
|
import com.github.catvod.utils.okhttp.OkHttpUtil;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
@@ -17,9 +18,12 @@ import java.util.regex.Pattern;
|
|||||||
public class Yiso extends Spider {
|
public class Yiso extends Spider {
|
||||||
private static final Pattern aliyun = Pattern.compile("(https://www.aliyundrive.com/s/[^\"]+)");
|
private static final Pattern aliyun = Pattern.compile("(https://www.aliyundrive.com/s/[^\"]+)");
|
||||||
@Override
|
@Override
|
||||||
public void init(Context context) {
|
public void init(Context context, String extend) {
|
||||||
super.init(context);
|
super.init(context);
|
||||||
PushAgent.fetchRule(false, 0);
|
if (Misc.pushAgent == null) {
|
||||||
|
Misc.pushAgent = new PushAgent();
|
||||||
|
Misc.pushAgent.init(context, extend);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -33,7 +37,7 @@ public class Yiso extends Spider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String playerContent(String str, String str2, List<String> list) {
|
public String playerContent(String str, String str2, List<String> list) {
|
||||||
return PushAgent.player(str, str2, list);
|
return Misc.pushAgent.player(str, str2, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static HashMap<String, String> sHeaders() {
|
protected static HashMap<String, String> sHeaders() {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.github.catvod.utils;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import com.github.catvod.crawler.SpiderDebug;
|
import com.github.catvod.crawler.SpiderDebug;
|
||||||
|
import com.github.catvod.spider.PushAgent;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -18,6 +19,7 @@ public class Misc {
|
|||||||
public static String jsonUrl = "http://test.xinjun58.com/sp/d.json";
|
public static String jsonUrl = "http://test.xinjun58.com/sp/d.json";
|
||||||
public static String refreshToken="http://catvod.fun:8001/tv/ali.txt";
|
public static String refreshToken="http://catvod.fun:8001/tv/ali.txt";
|
||||||
public static JSONObject siteRule = null;
|
public static JSONObject siteRule = null;
|
||||||
|
public static PushAgent pushAgent = null;
|
||||||
public static Integer type=1;
|
public static Integer type=1;
|
||||||
public static String btype="N";
|
public static String btype="N";
|
||||||
public static boolean rflag = false;
|
public static boolean rflag = false;
|
||||||
@@ -279,7 +281,10 @@ public class Misc {
|
|||||||
return regexStr;
|
return regexStr;
|
||||||
}
|
}
|
||||||
public static String tip(){
|
public static String tip(){
|
||||||
String text = btype + type + refreshToken;
|
if (rflag) {
|
||||||
return text;
|
String text = btype + type + refreshToken;
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user