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