一点点恢复

This commit is contained in:
zhangjie
2024-12-22 19:15:00 +08:00
9 changed files with 72 additions and 54 deletions

View File

@@ -2,12 +2,12 @@
### Based on CatVod
https://github.com/CatVodTVOfficial/CatVodTVSpider
## 总览 (觉得好用就点个Star吧)
## 吃瓜频道 实时更新
```shell
https://t.me/livecgchannle
## 广子(正经大额流量卡)
```
https://ym.ksjhaoka.com/?s=qaaJsQHd289860
```
## 总览 (觉得好用就点个Star吧)
## 机器人
```shell
@@ -45,19 +45,19 @@ https://t.me/liveddjkbot
## jar脚本 (上面状态不稳定哦)
```shell
https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar
https://gh-proxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar
```
# 点播接口专区
> 直接使用接口 (正能量)
```shell
https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/json/index.json
https://gh-proxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/json/index.json
```
> 纯18接口
```shell
https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/json/index18.json
https://gh-proxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/json/index18.json
```
> jsdelivr 免费 CDN
@@ -69,32 +69,22 @@ https://cdn.jsdelivr.net/gh/bizhangjie/CatVodSpider/json/index.json
> 虎牙一起看
```shell
https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/json/hy.txt
https://gh-proxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/json/hy.txt
```
> 斗鱼一起看
```shell
https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/json/dy.txt
https://gh-proxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/json/dy.txt
```
> 虎牙&斗鱼 一起看
```shell
https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/json/zbyqk.txt
https://gh-proxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/json/zbyqk.txt
```
> 成年人爱看的那些![img.png](img.png)
```shell
https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/json/sjdy.txt
```
> 韩国熊猫tv 需科学
```shell
https://api.buxiangyao.link/tvbox/tv.txt
```
> 在线观看(带字幕)需科学
```shell
https://api.buxiangyao.link/jp
https://gh-proxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/json/sjdy.txt
```
# 应用专区

View File

@@ -6,6 +6,8 @@ import android.widget.Button;
import com.github.catvod.R;
import com.github.catvod.crawler.Spider;
import com.github.catvod.spider.Cg51;
import com.github.catvod.spider.HiPianZhiBo;
import com.github.catvod.spider.Init;
import com.github.catvod.spider.J91;
import com.github.catvod.spider.RouVideo;
@@ -48,7 +50,7 @@ public class MainActivity extends Activity {
private void initSpider() {
try {
Init.init(getApplicationContext());
spider = new RouVideo();
spider = new HiPianZhiBo();
spider.init(this, "");
} catch (Throwable e) {
e.printStackTrace();
@@ -74,7 +76,7 @@ public class MainActivity extends Activity {
public void categoryContent(){
try {
Logger.t("categoryContent").d(spider.categoryContent("latest", "1", true, new HashMap<>()));
Logger.t("categoryContent").d(spider.categoryContent("22.html", "1", true, new HashMap<>()));
} catch (Throwable e) {
e.printStackTrace();
}
@@ -82,7 +84,7 @@ public class MainActivity extends Activity {
public void detailContent() {
try {
Logger.t("detailContent").d(spider.detailContent(Arrays.asList("ce11ee5c33035c2c9db0")));
Logger.t("detailContent").d(spider.detailContent(Arrays.asList("1034804")));
} catch (Throwable e) {
e.printStackTrace();
}
@@ -90,7 +92,7 @@ public class MainActivity extends Activity {
public void playerContent() {
try {
Logger.t("playerContent").d(spider.playerContent("轉存原畫", "122512-1-0.html", new ArrayList<>()));
Logger.t("playerContent").d(spider.playerContent("轉存原畫", "52d776427b3fad9f1536", new ArrayList<>()));
} catch (Throwable e) {
e.printStackTrace();
}

View File

@@ -27,7 +27,7 @@ import java.util.regex.Pattern;
public class Cg51 extends Spider {
private static final String siteUrl = "https://h25dz1.fyiltkhy.com";
private static final String siteUrl = "https://carrier.ujaumgp.cc";
private static final String cateUrl = siteUrl + "/category/";
private static final String detailUrl = siteUrl + "/archives/";
private static final String searchUrl = siteUrl + "/search?keywords=";

View File

@@ -24,7 +24,7 @@ import java.util.regex.Pattern;
public class HiPianZhiBo extends Spider {
private static final String siteUrl = "https://www.78dick.com";
private static final String siteUrl = "https://78isp.com";
private static final String cateUrl = siteUrl + "/index.php/vod/type/id/";
private static final String detailUrl = siteUrl + "/index.php/vod/play/id/";
private static final String playUrl = siteUrl + "/play/";

View File

@@ -7,6 +7,8 @@ import com.github.catvod.crawler.Spider;
import com.github.catvod.net.OkHttp;
import com.github.catvod.utils.Util;
import org.json.JSONArray;
import org.json.JSONObject;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
@@ -16,10 +18,12 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class J91 extends Spider {
private static final String siteUrl = "https://dchu38.xinhua111.com";
private static final String siteUrl = "https://ikk.jiukun66.autos";
private static final String cateUrl = siteUrl + "/video/category/";
private static final String detailUrl = siteUrl + "/video/view/";
private static final String searchUrl = siteUrl + "/search?keywords=";
@@ -32,17 +36,19 @@ public class J91 extends Spider {
private List<Vod> parseVods(Document doc) {
List<Vod> list = new ArrayList<>();
for (Element element : doc.select("div.video-elem")) {
String pic = element.select("div.img").attr("style");
for (Element element : doc.select("article")) {
String pic = element.select("img").attr("src");
String url = element.select("a").attr("href");
String name = element.select("a.title").text();
String name = element.select("h4").text();
if (pic.endsWith(".gif") || name.isEmpty()) continue;
if (!url.startsWith("http")) {
pic = pic.replace("background-image: url('", "").replace("')", "");
if (!pic.startsWith("http")) pic = "https:" + pic;
String id = url.split("/")[3];
list.add(new Vod(id, name, pic));
}
// if (!url.startsWith("http")) {
// pic = pic.replace("background-image: url('", "").replace("')", "");
// if (!pic.startsWith("http")) pic = "https:" + pic;
// String id = url.split("/")[3];
// list.add(new Vod(id, name, pic));
// }
String id = url.split("/")[3];
list.add(new Vod(id, name, pic));
}
return list;
}
@@ -50,8 +56,8 @@ public class J91 extends Spider {
@Override
public String homeContent(boolean filter) throws Exception {
List<Class> classes = new ArrayList<>();
String[] typeIdList = {"latest","hd","recent-favorite","hot-list","recent-rating","nonpaid","ori","long-list","longer-list","month-discuss","top-favorite","most-favorite","top-list","top-last"};
String[] typeNameList = {"最近更新","高清视频","最近加精","当前最热","最近得分","非付费","91原创","10分钟以上","20分钟以上","本月讨论","本月收藏","收藏最多","本月最热","上月最热"};
String[] typeIdList = {"latest", "hd", "recent-favorite", "hot-list", "recent-rating", "nonpaid", "ori", "long-list", "longer-list", "month-discuss", "top-favorite", "most-favorite", "top-list", "top-last"};
String[] typeNameList = {"最近更新", "高清视频", "最近加精", "当前最热", "最近得分", "非付费", "91原创", "10分钟以上", "20分钟以上", "本月讨论", "本月收藏", "收藏最多", "本月最热", "上月最热"};
for (int i = 0; i < typeNameList.length; i++) {
classes.add(new Class(typeIdList[i], typeNameList[i]));
}
@@ -63,10 +69,14 @@ public class J91 extends Spider {
@Override
public String categoryContent(String tid, String pg, boolean filter, HashMap<String, String> extend) throws Exception {
String target = cateUrl + tid + "/" + pg;
// System.out.printf("target ===> " + target);
Document doc = Jsoup.parse(OkHttp.string(target, getHeaders()));
List<Vod> list = parseVods(doc);
Integer total = (Integer.parseInt(pg)+1) * 20;
return Result.string(Integer.parseInt(pg),Integer.parseInt(pg)+1,20,total,list);
// System.out.println("=============================>>>>> ");
// System.out.println(list);
// System.out.println("=============================>>>>> ");
Integer total = (Integer.parseInt(pg) + 1) * 20;
return Result.string(Integer.parseInt(pg), Integer.parseInt(pg) + 1, 20, total, list);
}
@Override
@@ -75,7 +85,31 @@ public class J91 extends Spider {
String name = doc.select("meta[property=og:title]").attr("content");
String pic = doc.select("meta[property=og:image]").attr("content");
String year = doc.select("meta[property=video:release_date]").attr("content");
String playUrl = doc.select("#video-play").attr("data-src");
String html = doc.html();
// 打印 HTML 到控制台
// System.out.println(html);
// 2. 正则提取 window.$avdt 的 JSON 内容
Pattern pattern = Pattern.compile("window\\.\\$avdt\\s*=\\s*(\\{.*?\\})\\s*</script>", Pattern.DOTALL);
Matcher matcher = pattern.matcher(html);
String playUrl = "";
if (matcher.find()) {
String json = matcher.group(1).replaceAll("\\\\/", "/");
// System.out.println("✅ 提取到 JSON: " + json); // ✅ 调试输出
// 3. 解析 JSON 并构造播放地址
JSONObject avdt = new JSONObject(json);
String hls = avdt.optString("hls");
JSONArray cdns = avdt.optJSONArray("cdns");
if (cdns != null && cdns.length() > 0) {
String cdn = cdns.getString(0);
playUrl = "https://" + cdn + hls;
}
} else {
System.out.println("❌ 未提取到 window.$avdt JSON");
}
Vod vod = new Vod();
vod.setVodId(ids.get(0));
vod.setVodPic(pic);

Binary file not shown.

View File

@@ -1 +1 @@
8d592f6d2d1434ea5ec8506b56265485
5bfb9c86dc5ebd60fa91c2751f1cfa33

View File

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

View File

@@ -1,5 +1,5 @@
{
"spider": "https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar;md5;8d592f6d2d1434ea5ec8506b56265485",
"spider": "https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar;md5;5bfb9c86dc5ebd60fa91c2751f1cfa33",
"lives": [
{
"name": "直播ipv6",
@@ -27,14 +27,6 @@
"searchable": 1,
"filterable": 1
},
{
"key": "MiMei",
"name": "\uD83D\uDD1E 迷妹 | 珍惜",
"type": 3,
"api": "csp_MiMei",
"searchable": 1,
"filterable": 1
},
{
"key": "HiPianZhiBo",
"name": "\uD83D\uDD1E 嗨片直播 | 视频",