mirror of
https://github.com/bizhangjie/CatVodSpider.git
synced 2025-10-25 17:12:17 +00:00
'更新可用状态'
This commit is contained in:
35
README.md
35
README.md
@@ -10,23 +10,24 @@ https://github.com/CatVodTVOfficial/CatVodTVSpider
|
||||
> 🟠 可能失效
|
||||
> ❌ 无法使用
|
||||
|
||||
| **站点** | **类别** | **调用名称** | **状态** |
|
||||
|--------|--------|------| -------- |
|
||||
| 91 | 视频 | csp_J91 | 🟢 |
|
||||
| 51吃瓜 | 吃瓜 | csp_Cg51 | 🟢 |
|
||||
| Jabel | 教学 | csp_Jable | 🟢 |
|
||||
| 7xiTv | 视频 | csp_QxiTv | 🟢 |
|
||||
| Ikanbot | 视频 | csp_Ikanbot | 🟢 |
|
||||
| W55Movie | 视频 | csp_W55Movie | 🟢 |
|
||||
| Douban | 仅推荐 | csp_Douban | 🟢 |
|
||||
| CaoLiu | 视频 | csp_CaoLiu | 🟢 |
|
||||
| MiMei | 视频 | csp_MiMei | 🟢 |
|
||||
| XVideos | 视频 | csp_XVideos | 🟢 |
|
||||
| DaGongRen | 视频 | csp_DaGongRen | 🟢 |
|
||||
| HkTv | 视频 | csp_HkTv | 🟢 |
|
||||
| XMVideo | 视频 | csp_XMVideo | 🟢 |
|
||||
| WWRR | 视频 | csp_WWRR | 🟢 |
|
||||
| YingTan | 视频 | csp_YingTan | 🟢 |
|
||||
| **站点** | **类别** | **调用名称** | **状态** |
|
||||
|-----------|--------|---------------| -------- |
|
||||
| 91 | 视频 | csp_J91 | 🟢 |
|
||||
| 51吃瓜 | 吃瓜 | csp_Cg51 | 🟢 |
|
||||
| Jabel | 教学 | csp_Jable | 🟢 |
|
||||
| 7xiTv | 视频 | csp_QxiTv | 🟢 |
|
||||
| Ikanbot | 视频 | csp_Ikanbot | 🟢 |
|
||||
| W55Movie | 视频 | csp_W55Movie | 🟢 |
|
||||
| Douban | 仅推荐 | csp_Douban | 🟢 |
|
||||
| CaoLiu | 视频 | csp_CaoLiu | 🟢 |
|
||||
| MiMei | 视频 | csp_MiMei | 🟢 |
|
||||
| XVideos | 视频 | csp_XVideos | 🟢 |
|
||||
| DaGongRen | 视频 | csp_DaGongRen | 🟢 |
|
||||
| HkTv | 视频 | csp_HkTv | 🟢 |
|
||||
| XMVideo | 视频 | csp_XMVideo | 🟢 |
|
||||
| WWRR | 视频 | csp_WWRR | 🟢 |
|
||||
| YingTan | 视频 | csp_YingTan | 🟢 |
|
||||
| NCat | 视频 | csp_NCat | 🟢 |
|
||||
|
||||
> jar脚本 (上面状态不稳定哦)
|
||||
```shell
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.github.catvod.spider.JavDb;
|
||||
import com.github.catvod.spider.JustLive;
|
||||
import com.github.catvod.spider.MGTV;
|
||||
import com.github.catvod.spider.MiMei;
|
||||
import com.github.catvod.spider.NCat;
|
||||
import com.github.catvod.spider.QxiTv;
|
||||
import com.github.catvod.spider.ROU223;
|
||||
import com.github.catvod.spider.RouVideo;
|
||||
@@ -74,7 +75,7 @@ public class MainActivity extends Activity {
|
||||
private void initSpider() {
|
||||
try {
|
||||
Init.init(getApplicationContext());
|
||||
spider = new JJAiPian();
|
||||
spider = new NCat();
|
||||
spider.init(this, "");
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
@@ -108,7 +109,7 @@ public class MainActivity extends Activity {
|
||||
|
||||
public void detailContent() {
|
||||
try {
|
||||
Logger.t("detailContent").d(spider.detailContent(Arrays.asList("628397")));
|
||||
Logger.t("detailContent").d(spider.detailContent(Arrays.asList("230341.html")));
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -116,7 +117,7 @@ public class MainActivity extends Activity {
|
||||
|
||||
public void playerContent() {
|
||||
try {
|
||||
Logger.t("playerContent").d(spider.playerContent("轉存原畫", "168207/sid/6/nid/1.html", new ArrayList<>()));
|
||||
Logger.t("playerContent").d(spider.playerContent("轉存原畫", "152786-10-123806.html", new ArrayList<>()));
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
174
app/src/main/java/com/github/catvod/spider/NCat.java
Normal file
174
app/src/main/java/com/github/catvod/spider/NCat.java
Normal file
@@ -0,0 +1,174 @@
|
||||
package com.github.catvod.spider;
|
||||
|
||||
import com.github.catvod.bean.Class;
|
||||
import com.github.catvod.bean.Result;
|
||||
import com.github.catvod.bean.Vod;
|
||||
import com.github.catvod.crawler.Spider;
|
||||
import com.github.catvod.net.OkHttp;
|
||||
import com.github.catvod.utils.Util;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
import org.jsoup.select.Elements;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class NCat extends Spider {
|
||||
|
||||
private static final String siteUrl = "https://www.ncat3.com:51111";
|
||||
private static final String picUrl = "https://vres.a357899.cn";
|
||||
private static final String cateUrl = siteUrl + "/show/";
|
||||
private static final String detailUrl = siteUrl + "/detail/";
|
||||
private static final String searchUrl = siteUrl + "/search?k=";
|
||||
private static final String playUrl = siteUrl + "/play/";
|
||||
|
||||
private HashMap<String, String> getHeaders() {
|
||||
HashMap<String, String> headers = new HashMap<>();
|
||||
headers.put("User-Agent", Util.CHROME);
|
||||
return headers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String homeContent(boolean filter) throws Exception {
|
||||
List<Vod> list = new ArrayList<>();
|
||||
List<Class> classes = new ArrayList<>();
|
||||
String[] typeIdList = {"1", "2", "3", "4", "6"};
|
||||
String[] typeNameList = {"电影", "连续剧", "动漫", "综艺", "短剧"};
|
||||
for (int i = 0; i < typeNameList.length; i++) {
|
||||
classes.add(new Class(typeIdList[i], typeNameList[i]));
|
||||
}
|
||||
Document doc = Jsoup.parse(OkHttp.string(siteUrl, getHeaders()));
|
||||
for (Element element : doc.select("div.module-item")) {
|
||||
try {
|
||||
String pic = element.select("img").attr("data-original");
|
||||
String url = element.select("a").attr("href");
|
||||
String name = element.select("img").attr("title");
|
||||
if (!pic.startsWith("http")) {
|
||||
pic = picUrl + pic;
|
||||
}
|
||||
String id = url.split("/")[2];
|
||||
list.add(new Vod(id, name, pic));
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
return Result.string(classes, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String categoryContent(String tid, String pg, boolean filter, HashMap<String, String> extend) throws Exception {
|
||||
List<Vod> list = new ArrayList<>();
|
||||
String target = cateUrl + tid + "-----3-" + pg + ".html";
|
||||
Document doc = Jsoup.parse(OkHttp.string(target, getHeaders()));
|
||||
for (Element element : doc.select("div.module-item")) {
|
||||
try {
|
||||
String pic = element.select("img").attr("data-original");
|
||||
String url = element.select("a").attr("href");
|
||||
String name = element.select("img").attr("title");
|
||||
if (!pic.startsWith("http")) {
|
||||
pic = picUrl + pic;
|
||||
}
|
||||
String id = url.split("/")[2];
|
||||
list.add(new Vod(id, name, pic));
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
Integer total = (Integer.parseInt(pg) + 1) * 20;
|
||||
return Result.string(Integer.parseInt(pg), Integer.parseInt(pg) + 1, 20, total, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String detailContent(List<String> ids) throws Exception {
|
||||
Document doc = Jsoup.parse(OkHttp.string(detailUrl.concat(ids.get(0)), getHeaders()));
|
||||
String name = doc.select("div.detail-title strong").text();
|
||||
String pic = doc.select(".detail-pic img").attr("data-original");
|
||||
String year = doc.select("a.detail-tags-item").get(0).text();
|
||||
String desc = doc.select("div.detail-desc p").text();
|
||||
|
||||
// 播放源
|
||||
Elements tabs = doc.select("a.source-item span");
|
||||
Elements list = doc.select("div.episode-list");
|
||||
String PlayFrom = "";
|
||||
String PlayUrl = "";
|
||||
for (int i = 0; i < tabs.size(); i++) {
|
||||
String tabName = tabs.get(i).text();
|
||||
if (!"".equals(PlayFrom)) {
|
||||
PlayFrom = PlayFrom + "$$$" + tabName;
|
||||
} else {
|
||||
PlayFrom = PlayFrom + tabName;
|
||||
}
|
||||
Elements li = list.get(i).select("a");
|
||||
String liUrl = "";
|
||||
for (int i1 = 0; i1 < li.size(); i1++) {
|
||||
if (!"".equals(liUrl)) {
|
||||
liUrl = liUrl + "#" + li.get(i1).text() + "$" + li.get(i1).attr("href").replace("/play/", "");
|
||||
} else {
|
||||
liUrl = liUrl + li.get(i1).text() + "$" + li.get(i1).attr("href").replace("/play/", "");
|
||||
}
|
||||
}
|
||||
if (!"".equals(PlayUrl)) {
|
||||
PlayUrl = PlayUrl + "$$$" + liUrl;
|
||||
} else {
|
||||
PlayUrl = PlayUrl + liUrl;
|
||||
}
|
||||
}
|
||||
|
||||
Vod vod = new Vod();
|
||||
vod.setVodId(ids.get(0));
|
||||
vod.setVodPic(picUrl + pic);
|
||||
vod.setVodYear(year);
|
||||
vod.setVodName(name);
|
||||
vod.setVodContent(desc);
|
||||
vod.setVodPlayFrom(PlayFrom);
|
||||
vod.setVodPlayUrl(PlayUrl);
|
||||
return Result.string(vod);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String searchContent(String key, boolean quick) throws Exception {
|
||||
List<Vod> list = new ArrayList<>();
|
||||
Document doc = Jsoup.parse(OkHttp.string(searchUrl.concat(URLEncoder.encode(key)).concat(".html"), getHeaders()));
|
||||
for (Element element : doc.select("a.search-result-item")) {
|
||||
try {
|
||||
String pic = element.select("img").attr("data-original");
|
||||
String url = element.attr("href");
|
||||
String name = element.select("img").attr("title");
|
||||
if (!pic.startsWith("http")) {
|
||||
pic = picUrl + pic;
|
||||
}
|
||||
String id = url.split("/")[2];
|
||||
list.add(new Vod(id, name, pic));
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
return Result.string(list);
|
||||
}
|
||||
|
||||
@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 = "src: \"(.*?)m3u8\",";
|
||||
|
||||
Pattern pattern = Pattern.compile(regex);
|
||||
Matcher matcher = pattern.matcher(doc.html());
|
||||
String url = "";
|
||||
if (matcher.find()) {
|
||||
url = matcher.group(1);
|
||||
url = url.replace("\\/", "/") + "m3u8";
|
||||
}
|
||||
return Result.get().url(url).header(getHeaders()).string();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
c32ce1eca75695704389115782d99a56
|
||||
4fa91e831a495b00628b13b24b861ff7
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"spider": "https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar;md5;c32ce1eca75695704389115782d99a56",
|
||||
"spider": "https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar;md5;4fa91e831a495b00628b13b24b861ff7",
|
||||
"lives": [
|
||||
{
|
||||
"name": "直播ipv6",
|
||||
@@ -19,6 +19,14 @@
|
||||
}
|
||||
],
|
||||
"sites": [
|
||||
{
|
||||
"key": "NCat",
|
||||
"name": "\uD83D\uDE3C 网飞猫 | 影视",
|
||||
"type": 3,
|
||||
"api": "csp_NCat",
|
||||
"searchable": 1,
|
||||
"filterable": 1
|
||||
},
|
||||
{
|
||||
"key": "YingTan",
|
||||
"name": "\uD83D\uDCFD\uFE0F 影探 | 影视",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"spider": "https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar;md5;c32ce1eca75695704389115782d99a56",
|
||||
"spider": "https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar;md5;4fa91e831a495b00628b13b24b861ff7",
|
||||
"lives": [
|
||||
{
|
||||
"name": "直播ipv6",
|
||||
|
||||
Reference in New Issue
Block a user