add - PushAgent XBiubiu
This commit is contained in:
@@ -453,15 +453,17 @@ public class PushAgent extends Spider {
|
|||||||
Matcher matcher2 = pattern2.matcher(url);
|
Matcher matcher2 = pattern2.matcher(url);
|
||||||
Matcher matcher = pattern.matcher(url);
|
Matcher matcher = pattern.matcher(url);
|
||||||
if (Misc.isVip(url) && !url.contains("qq.com") && !url.contains("mgtv.com")) {
|
if (Misc.isVip(url) && !url.contains("qq.com") && !url.contains("mgtv.com")) {
|
||||||
|
String typeName = "官源";
|
||||||
Document doc = Jsoup.parse(OkHttpUtil.string(url, null));
|
Document doc = Jsoup.parse(OkHttpUtil.string(url, null));
|
||||||
String VodName = doc.select("head > title").text();
|
String VodName = doc.select("head > title").text();
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
JSONArray lists = new JSONArray();
|
JSONArray lists = new JSONArray();
|
||||||
JSONObject vodAtom = new JSONObject();
|
JSONObject vodAtom = new JSONObject();
|
||||||
|
if(url.contains("iqiyi")) typeName = "爱奇艺";
|
||||||
vodAtom.put("vod_id", url);
|
vodAtom.put("vod_id", url);
|
||||||
vodAtom.put("vod_name", VodName);
|
vodAtom.put("vod_name", VodName);
|
||||||
vodAtom.put("vod_pic", "https://img.zcool.cn/community/0123545c74c5aea801213f261297df.png");
|
vodAtom.put("vod_pic", "https://img.zcool.cn/community/0123545c74c5aea801213f261297df.png");
|
||||||
vodAtom.put("type_name", "官源");
|
vodAtom.put("type_name", typeName);
|
||||||
vodAtom.put("vod_year", "");
|
vodAtom.put("vod_year", "");
|
||||||
vodAtom.put("vod_area", "");
|
vodAtom.put("vod_area", "");
|
||||||
vodAtom.put("vod_remarks", "");
|
vodAtom.put("vod_remarks", "");
|
||||||
@@ -484,13 +486,16 @@ public class PushAgent extends Spider {
|
|||||||
if (!playListA.isEmpty()) {
|
if (!playListA.isEmpty()) {
|
||||||
for (int j = 0; j < playListA.size(); j++) {
|
for (int j = 0; j < playListA.size(); j++) {
|
||||||
Element vod = playListA.get(j);
|
Element vod = playListA.get(j);
|
||||||
String a = vod.select("div").attr("data-vid");
|
String img = vod.select("img").attr("src");
|
||||||
String b = vod.select("div").attr("data-cid");
|
if(img.equals("")||!img.contains("trailerlite")){
|
||||||
String id = "https://v.qq.com/x/cover/" + b + "/" + a;
|
String a = vod.select("div").attr("data-vid");
|
||||||
String name = vod.select("div span").text();
|
String b = vod.select("div").attr("data-cid");
|
||||||
vodItems.add(name + "$" + id);
|
String id = "https://v.qq.com/x/cover/" + b + "/" + a + ".html";
|
||||||
|
String name = vod.select("div span").text();
|
||||||
|
vodItems.add(name + "$" + id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
String playList = TextUtils.join("#", vodItems);
|
String playList = com.github.catvod.utils.TextUtils.join("#", vodItems);
|
||||||
vodAtom.put("vod_play_url", playList);
|
vodAtom.put("vod_play_url", playList);
|
||||||
} else {
|
} else {
|
||||||
vodAtom.put("vod_play_url", "立即播放$" + url);
|
vodAtom.put("vod_play_url", "立即播放$" + url);
|
||||||
@@ -525,7 +530,9 @@ public class PushAgent extends Spider {
|
|||||||
if (a.length() > 0) {
|
if (a.length() > 0) {
|
||||||
for (int i = 0; i < a.length(); i++) {
|
for (int i = 0; i < a.length(); i++) {
|
||||||
JSONObject jObj = a.getJSONObject(i);
|
JSONObject jObj = a.getJSONObject(i);
|
||||||
if (jObj.getString("isIntact").equals("1")) {
|
String isnew = jObj.getString("isnew");
|
||||||
|
String isvip = jObj.getString("isvip");
|
||||||
|
if (!(isnew.equals("2")&&isvip.equals("0"))) {
|
||||||
String VodName = jObj.getString("t4");
|
String VodName = jObj.getString("t4");
|
||||||
String id = jObj.getString("video_id");
|
String id = jObj.getString("video_id");
|
||||||
String VodId = "https://www.mgtv.com/b/" + mgtv1.group(1) + "/" + id + ".html";
|
String VodId = "https://www.mgtv.com/b/" + mgtv1.group(1) + "/" + id + ".html";
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ public class XBiubiu extends Spider {
|
|||||||
String link = subContent(lastParseContents.get(j), getRuleVal("bflianjieqian"), getRuleVal("bflianjiehou")).get(0);
|
String link = subContent(lastParseContents.get(j), getRuleVal("bflianjieqian"), getRuleVal("bflianjiehou")).get(0);
|
||||||
vodItems.add(title + "$" + link);
|
vodItems.add(title + "$" + link);
|
||||||
}
|
}
|
||||||
playList.add(TextUtils.join("#", vodItems));
|
playList.add(0, TextUtils.join("#", vodItems));
|
||||||
} catch (Throwable th) {
|
} catch (Throwable th) {
|
||||||
th.printStackTrace();
|
th.printStackTrace();
|
||||||
break;
|
break;
|
||||||
@@ -244,6 +244,7 @@ public class XBiubiu extends Spider {
|
|||||||
if (!getRuleVal("juqingqian").isEmpty() && !getRuleVal("juqinghou").isEmpty()) {
|
if (!getRuleVal("juqingqian").isEmpty() && !getRuleVal("juqinghou").isEmpty()) {
|
||||||
try {
|
try {
|
||||||
desc = subContent(html, getRuleVal("juqingqian"), getRuleVal("juqinghou")).get(0);
|
desc = subContent(html, getRuleVal("juqingqian"), getRuleVal("juqinghou")).get(0);
|
||||||
|
if(desc!=null)desc = desc.replaceAll(".*>(.*)", "$1");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
SpiderDebug.log(e);
|
SpiderDebug.log(e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user