This commit is contained in:
parent
5a3a860b17
commit
b85fead64d
|
|
@ -10,7 +10,7 @@
|
|||
# Gson
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
-dontwarn sun.misc.**
|
||||
-dontwarn sun.Utils.**
|
||||
-keep class com.google.gson.**{*;}
|
||||
-keep class * extends com.google.gson.TypeAdapter
|
||||
-keep class * implements com.google.gson.TypeAdapterFactory
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import android.util.Base64;
|
|||
|
||||
import com.github.catvod.crawler.Spider;
|
||||
import com.github.catvod.crawler.SpiderDebug;
|
||||
import com.github.catvod.utils.Misc;
|
||||
import com.github.catvod.utils.Utils;
|
||||
import com.github.catvod.utils.gZip;
|
||||
import com.github.catvod.utils.okhttp.OKCallBack;
|
||||
import com.github.catvod.utils.okhttp.OkHttpUtil;
|
||||
|
|
@ -421,7 +421,7 @@ public class Bdys01 extends Spider {
|
|||
}
|
||||
}
|
||||
long t = System.currentTimeMillis();
|
||||
String key = Misc.NewMD5(pid + "-" + t, StandardCharsets.UTF_8).substring(0, 16);
|
||||
String key = Utils.NewMD5(pid + "-" + t, StandardCharsets.UTF_8).substring(0, 16);
|
||||
String sg = encrypt(pid + "-" + t, key);
|
||||
String geturl = siteUrl + "/lines?t=" + t + "&sg=" + sg + "&pid=" + pid;
|
||||
String urlsrc = OkHttpUtil.string(geturl, getHeaders(geturl, ""));
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import com.github.catvod.bean.Result;
|
|||
import com.github.catvod.crawler.Spider;
|
||||
import com.github.catvod.crawler.SpiderDebug;
|
||||
import com.github.catvod.net.OkHttp;
|
||||
import com.github.catvod.utils.Misc;
|
||||
import com.github.catvod.utils.Utils;
|
||||
import com.github.catvod.utils.okhttp.OkHttpUtil;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -41,7 +41,7 @@ public class Bili01 extends Spider {
|
|||
|
||||
private void setHeader() throws Exception {
|
||||
header.put("cookie", getCookie(ext.getString("cookie")));
|
||||
header.put("User-Agent", Misc.CHROME);
|
||||
header.put("User-Agent", Utils.CHROME);
|
||||
header.put("Referer", url);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import android.text.TextUtils;
|
|||
|
||||
import com.github.catvod.crawler.Spider;
|
||||
import com.github.catvod.crawler.SpiderDebug;
|
||||
import com.github.catvod.utils.Misc;
|
||||
import com.github.catvod.utils.Utils;
|
||||
import com.github.catvod.utils.okhttp.OkHttpUtil;
|
||||
|
||||
import org.json.JSONArray;
|
||||
|
|
@ -37,7 +37,7 @@ public class Kunyu77 extends Spider {
|
|||
// HashMap<String, String> headers = new HashMap<>();
|
||||
HashMap<String, String> hashMap = new HashMap<String, String>();
|
||||
hashMap.put("user-agent", uAgent);
|
||||
hashMap.put("TK",Misc.MD5(url));
|
||||
hashMap.put("TK",Utils.MD5(url));
|
||||
hashMap.put("t", time);
|
||||
//headers.put("user-agent", uAgent);
|
||||
return hashMap;
|
||||
|
|
@ -347,7 +347,7 @@ public class Kunyu77 extends Spider {
|
|||
JSONObject playHeader = dataObj.optJSONObject("playHeader");
|
||||
String jxUrl = dataObj.getString("url");
|
||||
content = OkHttpUtil.string(jxUrl, getHeaders(jxUrl));
|
||||
JSONObject result = Misc.jsonParse(jxUrl, content);
|
||||
JSONObject result = Utils.jsonParse(jxUrl, content);
|
||||
if (result != null) {
|
||||
result.put("parse", 0);
|
||||
result.put("playUrl", "");
|
||||
|
|
@ -365,7 +365,7 @@ public class Kunyu77 extends Spider {
|
|||
} catch (Throwable th) {
|
||||
|
||||
}
|
||||
if (Misc.isVip(videoUrl)) {
|
||||
if (Utils.isVip(videoUrl)) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("parse", 1);
|
||||
result.put("jx", "1");
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import android.util.Base64;
|
|||
|
||||
import com.github.catvod.crawler.Spider;
|
||||
import com.github.catvod.crawler.SpiderDebug;
|
||||
import com.github.catvod.utils.Misc;
|
||||
import com.github.catvod.utils.Utils;
|
||||
import com.github.catvod.utils.okhttp.OKCallBack;
|
||||
import com.github.catvod.utils.okhttp.OkHttpUtil;
|
||||
|
||||
|
|
@ -334,7 +334,7 @@ public class LiteApple extends Spider {
|
|||
@Override
|
||||
public String playerContent(String flag, String id, List<String> vipFlags) {
|
||||
try {
|
||||
if (Misc.isVideoFormat(id)) {
|
||||
if (Utils.isVideoFormat(id)) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("parse", 0);
|
||||
result.put("header", "");
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import android.util.Pair;
|
|||
|
||||
import com.github.catvod.crawler.Spider;
|
||||
import com.github.catvod.crawler.SpiderDebug;
|
||||
import com.github.catvod.utils.Misc;
|
||||
import com.github.catvod.utils.Utils;
|
||||
import com.github.catvod.utils.okhttp.OKCallBack;
|
||||
import com.github.catvod.utils.okhttp.OkHttpUtil;
|
||||
|
||||
|
|
@ -311,7 +311,7 @@ public class XBiu extends Spider {
|
|||
e.printStackTrace();
|
||||
}
|
||||
if (!headers.containsKey("User-Agent")) {
|
||||
headers.put("User-Agent", Misc.CHROME);
|
||||
headers.put("User-Agent", com.github.catvod.utils.Utils.CHROME);
|
||||
}
|
||||
return headers;
|
||||
}
|
||||
|
|
@ -1165,7 +1165,7 @@ public class XBiu extends Spider {
|
|||
String vod_name = v.getString("vod_name");
|
||||
v.put("vod_remarks", guess_value_vod_remarks(nd, 0, vod_name));
|
||||
}
|
||||
v.put("vod_id", Base64.encodeToString(v.toString().getBytes(Misc.CharsetUTF8), base64Flag));
|
||||
v.put("vod_id", Base64.encodeToString(v.toString().getBytes(com.github.catvod.utils.Utils.CharsetUTF8), base64Flag));
|
||||
videos.put(v);
|
||||
}
|
||||
// pos += vod_id.length();
|
||||
|
|
@ -1724,7 +1724,7 @@ public class XBiu extends Spider {
|
|||
} else {
|
||||
v.put("vod_remarks", "");
|
||||
}
|
||||
v.put("vod_id", Base64.encodeToString(v.toString().getBytes(Misc.CharsetUTF8), base64Flag));
|
||||
v.put("vod_id", Base64.encodeToString(v.toString().getBytes(com.github.catvod.utils.Utils.CharsetUTF8), base64Flag));
|
||||
videos.put(v);
|
||||
}
|
||||
JSONObject result = new JSONObject();
|
||||
|
|
@ -1873,7 +1873,7 @@ public class XBiu extends Spider {
|
|||
String vod_name = v.getString("vod_name");
|
||||
v.put("vod_remarks", guess_value_vod_remarks(nd, 0, vod_name));
|
||||
}
|
||||
v.put("vod_id", Base64.encodeToString(v.toString().getBytes(Misc.CharsetUTF8), base64Flag));
|
||||
v.put("vod_id", Base64.encodeToString(v.toString().getBytes(com.github.catvod.utils.Utils.CharsetUTF8), base64Flag));
|
||||
videos.put(v);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import android.text.TextUtils;
|
|||
|
||||
import com.github.catvod.crawler.Spider;
|
||||
import com.github.catvod.crawler.SpiderDebug;
|
||||
import com.github.catvod.utils.Misc;
|
||||
import com.github.catvod.utils.Utils;
|
||||
import com.github.catvod.utils.okhttp.OKCallBack;
|
||||
import com.github.catvod.utils.okhttp.OkHttpUtil;
|
||||
|
||||
|
|
@ -59,9 +59,9 @@ public class XBiubiu extends Spider {
|
|||
|
||||
protected HashMap<String, String> getHeaders(String url) {
|
||||
HashMap<String, String> headers = new HashMap<>();
|
||||
String ua = getRuleVal("ua", Misc.CHROME).trim();
|
||||
String ua = getRuleVal("ua", Utils.CHROME).trim();
|
||||
if (ua.isEmpty())
|
||||
ua = Misc.CHROME;
|
||||
ua = Utils.CHROME;
|
||||
headers.put("User-Agent", ua);
|
||||
return headers;
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ public class XBiubiu extends Spider {
|
|||
} else {
|
||||
pic = subContent(jiequContent, getRuleVal("tupianqian"), getRuleVal("tupianhou")).get(0);
|
||||
}
|
||||
pic = Misc.fixUrl(webUrl, pic);
|
||||
pic = Utils.fixUrl(webUrl, pic);
|
||||
String link = subContent(jiequContent, getRuleVal("lianjieqian"), getRuleVal("lianjiehou")).get(0);
|
||||
link = getRuleVal("ljqianzhui").isEmpty() ? (link + getRuleVal("ljhouzhui")) : ("x:" + getRuleVal("ljqianzhui")) + link + getRuleVal("ljhouzhui");
|
||||
String remark = !getRuleVal("fubiaotiqian").isEmpty() && !getRuleVal("fubiaotihou").isEmpty() ?
|
||||
|
|
@ -365,7 +365,7 @@ public class XBiubiu extends Spider {
|
|||
String name = vod.optString(getRuleVal("jsname")).trim();
|
||||
String id = vod.optString(getRuleVal("jsid")).trim();
|
||||
String pic = vod.optString(getRuleVal("jspic")).trim();
|
||||
pic = Misc.fixUrl(webUrl, pic);
|
||||
pic = Utils.fixUrl(webUrl, pic);
|
||||
String link = getRuleVal("sousuohouzhui") + id;
|
||||
link = getRuleVal("ssljqianzhui").isEmpty() ? (link + getRuleVal("ssljhouzhui")) : ("x:" + getRuleVal("ssljqianzhui")) + link + getRuleVal("ssljhouzhui");
|
||||
JSONObject v = new JSONObject();
|
||||
|
|
@ -391,7 +391,7 @@ public class XBiubiu extends Spider {
|
|||
String jiequContent = jiequContents.get(i);
|
||||
String title = subContent(jiequContent, getRuleVal("ssbiaotiqian"), getRuleVal("ssbiaotihou")).get(0);
|
||||
String pic = subContent(jiequContent, getRuleVal("sstupianqian"), getRuleVal("sstupianhou")).get(0);
|
||||
pic = Misc.fixUrl(webUrl, pic);
|
||||
pic = Utils.fixUrl(webUrl, pic);
|
||||
String link = subContent(jiequContent, getRuleVal("sslianjieqian"), getRuleVal("sslianjiehou")).get(0);
|
||||
link = getRuleVal("ssljqianzhui").isEmpty() ? (link + getRuleVal("ssljhouzhui")) : ("x:" + getRuleVal("ssljqianzhui")) + link + getRuleVal("ssljhouzhui");
|
||||
String remark = "";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import android.util.Base64;
|
|||
|
||||
import com.github.catvod.crawler.Spider;
|
||||
import com.github.catvod.crawler.SpiderDebug;
|
||||
import com.github.catvod.utils.Misc;
|
||||
import com.github.catvod.utils.Utils;
|
||||
import com.github.catvod.utils.okhttp.OKCallBack;
|
||||
import com.github.catvod.utils.okhttp.OkHttpUtil;
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ public class XYQBiu extends Spider {
|
|||
if (!getRuleVal("catjsonpic").isEmpty()) {
|
||||
try {
|
||||
pic = vod.optString(getRuleVal("catjsonpic")).trim();
|
||||
pic = Misc.fixUrl(webUrl, pic);
|
||||
pic = Utils.fixUrl(webUrl, pic);
|
||||
if (picneetproxy) {
|
||||
pic = fixCover(pic, webUrl);
|
||||
}
|
||||
|
|
@ -295,7 +295,7 @@ public class XYQBiu extends Spider {
|
|||
if (!getRuleVal("cat_pic").isEmpty()) {
|
||||
try {
|
||||
pic = subContent(jiequContent, getRuleVal("cat_pic").split("&&")[0], getRuleVal("cat_pic").split("&&")[1]).get(0);
|
||||
pic = Misc.fixUrl(webUrl, pic);
|
||||
pic = Utils.fixUrl(webUrl, pic);
|
||||
if (picneetproxy) {
|
||||
pic = fixCover(pic, webUrl);
|
||||
}
|
||||
|
|
@ -544,13 +544,13 @@ public class XYQBiu extends Spider {
|
|||
result.put("header", webheaders.toString());
|
||||
}
|
||||
//视频格式识别
|
||||
if (webUrl.contains("#isVideo=true#") || Misc.isVideoFormat(webUrl)) {
|
||||
if (webUrl.contains("#isVideo=true#") || Utils.isVideoFormat(webUrl)) {
|
||||
if (webUrl.contains("#isVideo=true#")) {
|
||||
webUrl = webUrl.replaceAll("#isVideo=true#", "");
|
||||
}
|
||||
result.put("parse", 0);
|
||||
result.put("playUrl", "");
|
||||
} else if (Misc.isVip(webUrl)) {
|
||||
} else if (Utils.isVip(webUrl)) {
|
||||
result.put("parse", 1);
|
||||
result.put("jx", "1");
|
||||
result.put("url", webUrl);
|
||||
|
|
@ -606,7 +606,7 @@ public class XYQBiu extends Spider {
|
|||
|
||||
//视频不为null时进行处理解析
|
||||
if (videoUrl != null) {
|
||||
if (Misc.isVip(videoUrl)) { // 使用jx:1
|
||||
if (Utils.isVip(videoUrl)) { // 使用jx:1
|
||||
try {
|
||||
result.put("parse", 1);
|
||||
result.put("jx", "1");
|
||||
|
|
@ -622,7 +622,7 @@ public class XYQBiu extends Spider {
|
|||
result.put("playUrl", "");
|
||||
result.put("url", webUrl);
|
||||
return result.toString();
|
||||
} else if (Misc.isVideoFormat(videoUrl)) {
|
||||
} else if (Utils.isVideoFormat(videoUrl)) {
|
||||
try {
|
||||
result.put("parse", 0);
|
||||
result.put("playUrl", "");
|
||||
|
|
@ -754,7 +754,7 @@ public class XYQBiu extends Spider {
|
|||
if (!getRuleVal("jsonpic").isEmpty()) {
|
||||
try {
|
||||
pic = vod.optString(getRuleVal("jsonpic")).trim();
|
||||
pic = Misc.fixUrl(webUrl, pic);
|
||||
pic = Utils.fixUrl(webUrl, pic);
|
||||
if (picneetproxy) {
|
||||
pic = fixCover(pic, webUrl);
|
||||
}
|
||||
|
|
@ -795,7 +795,7 @@ public class XYQBiu extends Spider {
|
|||
if (!getRuleVal("sea_pic").isEmpty()) {
|
||||
try {
|
||||
pic = subContent(jiequContent, getRuleVal("sea_pic").split("&&")[0], getRuleVal("sea_pic").split("&&")[1]).get(0);
|
||||
pic = Misc.fixUrl(webUrl, pic);
|
||||
pic = Utils.fixUrl(webUrl, pic);
|
||||
if (picneetproxy) {
|
||||
pic = fixCover(pic, webUrl);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ import java.util.Locale;
|
|||
public class Utils {
|
||||
|
||||
public static final String CHROME = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36";
|
||||
|
||||
public static final String CHROME = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36";
|
||||
public static Charset CharsetUTF8 = Charset.forName("UTF-8");
|
||||
public static Charset CharsetIOS8859 = Charset.forName("iso-8859-1");
|
||||
public static boolean isVip(String url) {
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
a36f3ed40973e12b6431dcd15c485935
|
||||
3bda63c12e463189328eecf144f59503
|
||||
|
|
|
|||
Loading…
Reference in New Issue