add - 自定义视频路径6
This commit is contained in:
@@ -50,13 +50,14 @@ public class PushAgent extends Spider {
|
||||
@Override
|
||||
public void init(Context context, String extend) {
|
||||
super.init(context, extend);
|
||||
if (extend.startsWith("http")) {
|
||||
Token = OkHttpUtil.string(extend, null);
|
||||
} else {
|
||||
if (extend != null) {
|
||||
String[] arr = extend.split(";");
|
||||
if (arr.length > 1) {
|
||||
this.Token = arr[0];
|
||||
}else Token = extend;
|
||||
/* if (extend.startsWith("http")) {
|
||||
Token = OkHttpUtil.string(extend, null);
|
||||
} */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,7 +354,7 @@ public class PushAgent extends Spider {
|
||||
try {
|
||||
String url = list.get(0).trim();
|
||||
String[] idInfo = url.split("\\$\\$\\$");
|
||||
if (idInfo.length > 1) url = idInfo[0].trim();
|
||||
if (idInfo.length > 0) url = idInfo[0].trim();
|
||||
Pattern pattern = Folder;
|
||||
Matcher matcher = pattern.matcher(url);
|
||||
if (!matcher.find()) {
|
||||
@@ -455,9 +456,9 @@ public class PushAgent extends Spider {
|
||||
try {
|
||||
String url = list.get(0).trim();
|
||||
String[] idInfo = url.split("\\$\\$\\$");
|
||||
if (idInfo.length > 1) url = idInfo[0].trim();
|
||||
if (idInfo.length > 0) url = idInfo[0].trim();
|
||||
String pic = null;
|
||||
if (!idInfo[1].equals("")) {
|
||||
if (idInfo.length>1&&!idInfo[1].equals("")) {
|
||||
pic = idInfo[1].trim();
|
||||
}
|
||||
Pattern pattern = Folder;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.github.catvod.spider;
|
||||
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;
|
||||
import org.json.JSONObject;
|
||||
@@ -124,7 +125,7 @@ public class PushAgentQQ extends Spider {
|
||||
v.put("vod_id", url + "$$$" + pic + "$$$" + name);
|
||||
v.put("vod_name", name);
|
||||
v.put("vod_pic", pic);
|
||||
v.put("vod_remarks", "");
|
||||
v.put("vod_remarks", Misc.getWebName(url));
|
||||
videos.put(v);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user