mirror of
https://github.com/bizhangjie/CatVodSpider.git
synced 2025-12-13 19:52:19 +00:00
'更新可用状态'
This commit is contained in:
@@ -14,6 +14,7 @@ import com.github.catvod.spider.Cg51;
|
||||
import com.github.catvod.spider.DaGongRen;
|
||||
import com.github.catvod.spider.Douban;
|
||||
import com.github.catvod.spider.Fpie2;
|
||||
import com.github.catvod.spider.HiPianZhiBo;
|
||||
import com.github.catvod.spider.HkTv;
|
||||
import com.github.catvod.spider.IQIYI;
|
||||
import com.github.catvod.spider.Ikanbot;
|
||||
@@ -25,6 +26,7 @@ import com.github.catvod.spider.JustLive;
|
||||
import com.github.catvod.spider.MGTV;
|
||||
import com.github.catvod.spider.MiMei;
|
||||
import com.github.catvod.spider.QxiTv;
|
||||
import com.github.catvod.spider.ROU223;
|
||||
import com.github.catvod.spider.RouVideo;
|
||||
import com.github.catvod.spider.W55Movie;
|
||||
import com.github.catvod.spider.WWRR;
|
||||
@@ -71,7 +73,7 @@ public class MainActivity extends Activity {
|
||||
private void initSpider() {
|
||||
try {
|
||||
Init.init(getApplicationContext());
|
||||
spider = new YingTan();
|
||||
spider = new ROU223();
|
||||
spider.init(this, "");
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
@@ -97,7 +99,7 @@ public class MainActivity extends Activity {
|
||||
public void categoryContent(){
|
||||
|
||||
try {
|
||||
Logger.t("categoryContent").d(spider.categoryContent("20", "2", true, new HashMap<>()));
|
||||
Logger.t("categoryContent").d(spider.categoryContent("/sanjijingdian/", "2", true, new HashMap<>()));
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -105,7 +107,7 @@ public class MainActivity extends Activity {
|
||||
|
||||
public void detailContent() {
|
||||
try {
|
||||
Logger.t("detailContent").d(spider.detailContent(Arrays.asList("250756")));
|
||||
Logger.t("detailContent").d(spider.detailContent(Arrays.asList("/htm/2024/4/17/yazhouxingai/630516.html")));
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
130
app/src/main/java/com/github/catvod/spider/HiPianZhiBo.java
Normal file
130
app/src/main/java/com/github/catvod/spider/HiPianZhiBo.java
Normal file
@@ -0,0 +1,130 @@
|
||||
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 org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
import org.jsoup.select.Elements;
|
||||
|
||||
import java.net.URLDecoder;
|
||||
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 HiPianZhiBo extends Spider {
|
||||
|
||||
private static final String siteUrl = "https://www.78dick.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/";
|
||||
private static final String searchUrl = siteUrl + "/index.php/vod/search.html?wd=";
|
||||
|
||||
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<>();
|
||||
Document doc = Jsoup.parse(OkHttp.string(siteUrl, getHeaders()));
|
||||
Integer count = 0;
|
||||
for (Element element : doc.select("ul.nav.navbar-nav a")) {
|
||||
if (count <= 7){
|
||||
String href = element.attr("href").replace("/index.php/vod/type/id/","").replace(".html","");
|
||||
String text = element.text();
|
||||
classes.add(new Class(href, text));
|
||||
}else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
doc = Jsoup.parse(OkHttp.string(siteUrl, getHeaders()));
|
||||
for (Element element : doc.select("div.block")) {
|
||||
try {
|
||||
String pic = element.select("img").attr("src");
|
||||
String url = element.select("a").attr("href");
|
||||
String name = element.select("div.block-title a").text();
|
||||
String id = url.split("/")[5];
|
||||
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 + "/page/" + pg + ".html";
|
||||
Document doc = Jsoup.parse(OkHttp.string(target, getHeaders()));
|
||||
for (Element element : doc.select("div.block")) {
|
||||
try {
|
||||
String pic = element.select("img").attr("src");
|
||||
String url = element.select("a").attr("href");
|
||||
String name = element.select("div.block-title a").text();
|
||||
String id = url.split("/")[5];
|
||||
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)).concat("/sid/1/nid/1.html"), getHeaders()));
|
||||
String name = doc.select("h3.title").text();
|
||||
String regex = "\"url\":\"(.*?)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";
|
||||
}
|
||||
Vod vod = new Vod();
|
||||
vod.setVodId(ids.get(0));
|
||||
vod.setVodName(name);
|
||||
vod.setVodPlayFrom("嗨片直播");
|
||||
vod.setVodPlayUrl("播放$" + url);
|
||||
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(key), getHeaders()));
|
||||
for (Element element : doc.select("div.block")) {
|
||||
try {
|
||||
String pic = element.select("img").attr("src");
|
||||
String url = element.select("a").attr("href");
|
||||
String name = element.select("div.block-title a").text();
|
||||
String id = url.split("/")[5];
|
||||
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 {
|
||||
return Result.get().url(id).header(getHeaders()).string();
|
||||
}
|
||||
}
|
||||
136
app/src/main/java/com/github/catvod/spider/ROU223.java
Normal file
136
app/src/main/java/com/github/catvod/spider/ROU223.java
Normal file
@@ -0,0 +1,136 @@
|
||||
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 org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class ROU223 extends Spider {
|
||||
|
||||
private static final String siteUrl = "http://223rou.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/";
|
||||
private static final String searchUrl = siteUrl + "/index.php/vod/search.html?wd=";
|
||||
|
||||
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<>();
|
||||
Document doc = Jsoup.parse(OkHttp.string(siteUrl, getHeaders()));
|
||||
Integer count = 0;
|
||||
for (Element element : doc.select("div.menu.clearfix dl dd")) {
|
||||
if ( count >= 0 && count <= 16){
|
||||
String href = element.select("a").attr("href").replace("index.html","");
|
||||
String text = element.text();
|
||||
classes.add(new Class(href, text));
|
||||
}
|
||||
count ++;
|
||||
}
|
||||
doc = Jsoup.parse(OkHttp.string(siteUrl, getHeaders()));
|
||||
for (Element element : doc.select("div.row.col5.clearfix dt a")) {
|
||||
try {
|
||||
String pic = element.select("img").attr("data-original");
|
||||
String url = element.attr("href");
|
||||
String name = element.attr("title");
|
||||
String id = url;
|
||||
list.add(new Vod(id, name,siteUrl + 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 = siteUrl + tid + "list_" + pg + ".html";
|
||||
Document doc = Jsoup.parse(OkHttp.string(target, getHeaders()));
|
||||
for (Element element : doc.select("div.row.col5.clearfix dt a")) {
|
||||
try {
|
||||
String pic = element.select("img").attr("data-original");
|
||||
String url = element.attr("href");
|
||||
String name = element.attr("title");
|
||||
String id = url;
|
||||
list.add(new Vod(id, name, siteUrl + 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(siteUrl.concat(ids.get(0)), getHeaders()));
|
||||
String name = doc.select("title").text().split("-")[0];
|
||||
String regex = "playUrl=\"(.*?)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";
|
||||
}
|
||||
|
||||
String regex2 = "posterImg=\"(.*?)\";";
|
||||
|
||||
Pattern pattern2 = Pattern.compile(regex2);
|
||||
Matcher matcher2 = pattern2.matcher(doc.html());
|
||||
String pic = "";
|
||||
if (matcher2.find()) {
|
||||
pic = matcher2.group(1);
|
||||
pic = pic.replace("\\/","/");
|
||||
}
|
||||
|
||||
Vod vod = new Vod();
|
||||
vod.setVodId(ids.get(0));
|
||||
vod.setVodName(name);
|
||||
vod.setVodPic(siteUrl + pic);
|
||||
vod.setVodPlayFrom("223ROU");
|
||||
vod.setVodPlayUrl("播放$" + url);
|
||||
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(key), getHeaders()));
|
||||
for (Element element : doc.select("div.row.col5.clearfix dt a")) {
|
||||
try {
|
||||
String pic = element.select("img").attr("data-original");
|
||||
String url = element.attr("href");
|
||||
String name = element.attr("title");
|
||||
String id = url;
|
||||
list.add(new Vod(id, name, siteUrl + pic));
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
return Result.string(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String playerContent(String flag, String id, List<String> vipFlags) throws Exception {
|
||||
return Result.get().url(id).header(getHeaders()).string();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
f1b9ad6b437922486195793d55e31000
|
||||
4642e62842d193cbcc4a6b45eb4c705d
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"spider": "https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar;md5;f1b9ad6b437922486195793d55e31000",
|
||||
"spider": "https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar;md5;4642e62842d193cbcc4a6b45eb4c705d",
|
||||
"lives": [
|
||||
{
|
||||
"name": "直播ipv6",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"spider": "https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar;md5;f1b9ad6b437922486195793d55e31000",
|
||||
"spider": "https://mirror.ghproxy.com/https://github.com/bizhangjie/CatVodSpider/blob/main/jar/custom_spider.jar;md5;4642e62842d193cbcc4a6b45eb4c705d",
|
||||
"lives": [
|
||||
{
|
||||
"name": "直播ipv6",
|
||||
@@ -69,13 +69,28 @@
|
||||
},
|
||||
{
|
||||
"key": "RouVideo",
|
||||
"name": "\uD83D\uDD1E 肉视频 | 视频",
|
||||
"name": "\uD83D\uDD1E 肉视频 | 科学",
|
||||
"type": 3,
|
||||
"api": "csp_RouVideo",
|
||||
"searchable": 1,
|
||||
"filterable": 1
|
||||
},
|
||||
{
|
||||
"key": "ROU223",
|
||||
"name": "\uD83D\uDD1E 223ROU | 视频",
|
||||
"type": 3,
|
||||
"api": "csp_ROU223",
|
||||
"searchable": 0,
|
||||
"filterable": 1
|
||||
},
|
||||
{
|
||||
"key": "HiPianZhiBo",
|
||||
"name": "\uD83D\uDD1E 嗨片直播 | 视频",
|
||||
"type": 3,
|
||||
"api": "csp_HiPianZhiBo",
|
||||
"searchable": 1,
|
||||
"filterable": 1
|
||||
}, {
|
||||
"key": "*博天堂",
|
||||
"name": "🔞博天堂",
|
||||
"type": 0,
|
||||
|
||||
Reference in New Issue
Block a user