add - douban 格式

This commit is contained in:
yangqiang3504
2022-10-09 11:56:15 +08:00
parent 03cb131fd8
commit 9772b9529b
5 changed files with 233 additions and 12 deletions
@@ -1,16 +1,41 @@
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.okhttp.OkHttpUtil;
import org.json.JSONArray;
import org.json.JSONObject;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List;
import java.util.regex.Pattern;
public class Yiso extends PushAgent {
private static final Pattern aliyun = Pattern.compile("(https://www.aliyundrive.com/s/[^\"]+)");
public class Yiso extends Spider {
private PushAgent pushAgent;
public String detailContent(List<String> list) {
try {
return pushAgent.detailContent(list);
} catch (Exception e) {
SpiderDebug.log(e);
}
return "";
}
@Override
public void init(Context context) {
super.init(context);
pushAgent = new PushAgent();
pushAgent.init(context);
}
public String playerContent(String str, String str2, List<String> list) {
return pushAgent.playerContent(str, str2, list);
}
protected static HashMap<String, String> sHeaders() {
HashMap<String, String> headers = new HashMap<>();
@@ -30,7 +55,7 @@ public class Yiso extends PushAgent {
String content = OkHttpUtil.string(url, LT);
JSONObject data = new JSONObject(content);
JSONArray list = data.getJSONObject("data").getJSONArray("list");
String cover = "https://f.haocew.com/image/tv/yiso.jpg";
JSONObject result = new JSONObject();
JSONArray videos = new JSONArray();
for (int i = 0; i < list.length(); i++) {
@@ -40,7 +65,6 @@ public class Yiso extends PushAgent {
String id = jSONObject.getString("url");
JSONObject v = new JSONObject();
String cover = "https://f.haocew.com/image/tv/yiso.jpg";
v.put("vod_name", sourceName);
v.put("vod_remarks", remark);
v.put("vod_id", id + "$$$" + cover + "$$$" + sourceName);