'更新可用状态'

This commit is contained in:
zhangjie
2024-04-23 18:11:43 +08:00
parent 8bee1e7013
commit cdccc991d8
5 changed files with 11 additions and 7 deletions

View File

@@ -118,7 +118,7 @@ public class MainActivity extends Activity {
public void playerContent() {
try {
Logger.t("playerContent").d(spider.playerContent("轉存原畫", "121974-1-2.html", new ArrayList<>()));
Logger.t("playerContent").d(spider.playerContent("轉存原畫", "122512-1-0.html", new ArrayList<>()));
} catch (Throwable e) {
e.printStackTrace();
}

View File

@@ -18,6 +18,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import android.util.Base64;
public class TvDy extends Spider {
@@ -154,15 +155,18 @@ public class TvDy extends Spider {
@Override
public String playerContent(String flag, String id, List<String> vipFlags) throws Exception {
Document doc = Jsoup.parse(OkHttp.string(playUrl.concat(id), getHeaders()));
String regex = "now=base64decode(\"(.*?)\");";
String regex = "var now=base64decode(.*?);var";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(doc.html());
String url = "";
String url = doc.html();
if (matcher.find()) {
url = matcher.group(1);
url = url;
url = decodeBase64(matcher.group(1).replace("(\\\"","").replace("\\\")",""));
}
return Result.get().url(url).header(getHeaders()).string();
}
public static String decodeBase64(String encodedString) {
return new String(Base64.decode(encodedString, Base64.DEFAULT));
}
}

Binary file not shown.

View File

@@ -1 +1 @@
a2e67333ec2a448a0ec16f708ede4f03
4b13c299ed9dfca65bc775507a7d0118

View File

@@ -1,5 +1,5 @@
{
"spider": "https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar;md5;a2e67333ec2a448a0ec16f708ede4f03",
"spider": "https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar;md5;4b13c299ed9dfca65bc775507a7d0118",
"lives": [
{
"name": "直播ipv6",