This commit is contained in:
GH Action - Upstream Sync 2023-08-27 12:26:54 +00:00
commit ff7b6f8ea6
7 changed files with 12 additions and 5 deletions

View File

@ -2,6 +2,7 @@ package com.github.catvod.net;
import android.text.TextUtils;
import com.github.catvod.crawler.SpiderDebug;
import com.github.catvod.utils.Utils;
import java.io.IOException;
@ -76,8 +77,12 @@ class OkRequest {
Response response = client.newCall(request).execute();
if (respHeader != null) respHeader.clear();
if (respHeader != null) respHeader.putAll(response.headers().toMultimap());
return new OkResult(response.code(), response.body().string());
int code = response.code();
String body = response.body().string();
SpiderDebug.log(code + "," + body);
return new OkResult(code, body);
} catch (IOException e) {
SpiderDebug.log(e);
return new OkResult();
}
}

View File

@ -32,6 +32,7 @@ public class Dm84 extends Spider {
private HashMap<String, String> getHeaders() {
HashMap<String, String> headers = new HashMap<>();
headers.put("User-Agent", Utils.CHROME);
headers.put("Accept", Utils.ACCEPT);
return headers;
}

View File

@ -25,7 +25,8 @@ import java.util.regex.Pattern;
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/116.0.0.0 Safari/537.36";
public static final String ACCEPT = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7";
public static final List<String> MEDIA = Arrays.asList("mp4", "mkv", "wmv", "flv", "avi", "mp3", "aac", "flac", "m4a", "ape", "ogg");
public static final Pattern RULE = Pattern.compile(
"http((?!http).){12,}?\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)\\?.*|" +

Binary file not shown.

View File

@ -1 +1 @@
8f735b6bf0cda5984e8ec2c184fa9cd0
9a8ad560e957f4016cf6553605039491

View File

@ -1,5 +1,5 @@
{
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;8f735b6bf0cda5984e8ec2c184fa9cd0",
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;9a8ad560e957f4016cf6553605039491",
"wallpaper": "https://gao.chuqiuyu.tk",
"sites": [
{

View File

@ -1,5 +1,5 @@
{
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;8f735b6bf0cda5984e8ec2c184fa9cd0",
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;9a8ad560e957f4016cf6553605039491",
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
"sites": [
{