Fix Kanqiu

This commit is contained in:
qlql765 2024-06-07 14:22:38 +08:00
parent 15f94bc061
commit 4b7b789023
3 changed files with 6 additions and 7 deletions

View File

@ -14,7 +14,6 @@ import com.github.catvod.utils.Util;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONObject; import org.json.JSONObject;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
import org.jsoup.select.Elements; import org.jsoup.select.Elements;
@ -29,7 +28,7 @@ import java.util.Map;
*/ */
public class Kanqiu extends Spider { public class Kanqiu extends Spider {
private static String siteUrl = "http://www.88kanqiu.one"; private static String siteUrl = "http://www.88kanqiu.tw";
private Map<String, String> getHeader() { private Map<String, String> getHeader() {
Map<String, String> header = new HashMap<>(); Map<String, String> header = new HashMap<>();
@ -74,10 +73,10 @@ public class Kanqiu extends Spider {
@Override @Override
public String detailContent(List<String> ids) throws Exception { public String detailContent(List<String> ids) throws Exception {
if (ids.get(0).equals(siteUrl)) return Result.error("賽尚未開"); if (ids.get(0).equals(siteUrl)) return Result.error("赛尚未开");
Document doc = Jsoup.parse(OkHttp.string(ids.get(0), getHeader())); String content = OkHttp.string(ids.get(0) + "-url", getHeader());
String t = doc.select("#t").attr("value"); String result = new JSONObject(content).optString("data");
String result = t.substring(6); result = result.substring(6);
result = result.substring(0, result.length() - 2); result = result.substring(0, result.length() - 2);
String json = new String(Base64.decode(result, Base64.DEFAULT)); String json = new String(Base64.decode(result, Base64.DEFAULT));
JSONArray linksArray = new JSONObject(json).getJSONArray("links"); JSONArray linksArray = new JSONObject(json).getJSONArray("links");

Binary file not shown.

View File

@ -1 +1 @@
981f96ca587242d475007855c5b33f56 8327a95a4336dac3f0177f08056d3165