This commit is contained in:
lushunming 2025-11-15 09:19:09 +08:00
parent a3386d343a
commit 7f49ff239f
6 changed files with 195 additions and 26 deletions

View File

@ -0,0 +1,56 @@
package com.github.catvod.spider
import com.github.catvod.bean.Result
import com.github.catvod.bean.Vod
import com.github.catvod.net.OkHttp
import com.github.catvod.utils.Json
import com.github.catvod.utils.Util
import java.net.URLEncoder
import java.nio.charset.Charset
/**
* @author zhixc
*/
class Tg123Search : Cloud() {
private val URL = "https://tgsou.252035.xyz/"
private val header: Map<String, String>
get() {
val header: MutableMap<String, String> = HashMap()
header["User-Agent"] = Util.CHROME
return header
}
@Throws(Exception::class)
override fun searchContent(key: String, quick: Boolean): String {
val url =
URL + "?channelUsername=wp123zy,xx123pan,yp123pan,zyfb123&pic=true&keyword=" + URLEncoder.encode(
key, Charset.defaultCharset().name()
)
val list: MutableList<Vod> = ArrayList()
val html = OkHttp.string(url, header)
val json = Json.safeObject(html);
json["results"].asJsonArray.forEach { element ->
val array = element.asString.split("$$$")
if (array.size >= 2 && array[1].isNotEmpty()) {
array[1].split("##").forEach {
val id = it.split("@")[0]
val pic = it.split("@")[1].split("$$")[0]
val name = it.split("@")[1].split("$$")[1]
list.add(Vod(id, name, pic, ""))
}
}
}
return Result.string(list)
}
}

View File

@ -3,8 +3,8 @@ package com.github.catvod.spider
import com.github.catvod.bean.Result import com.github.catvod.bean.Result
import com.github.catvod.bean.Vod import com.github.catvod.bean.Vod
import com.github.catvod.net.OkHttp import com.github.catvod.net.OkHttp
import com.github.catvod.utils.Json
import com.github.catvod.utils.Util import com.github.catvod.utils.Util
import org.jsoup.Jsoup
import java.net.URLEncoder import java.net.URLEncoder
import java.nio.charset.Charset import java.nio.charset.Charset
@ -12,7 +12,7 @@ import java.nio.charset.Charset
* @author zhixc * @author zhixc
*/ */
class Tg189Search : Cloud() { class Tg189Search : Cloud() {
private val URL = "https://tg.252035.xyz/" private val URL = "https://tgsou.252035.xyz/"
private val header: Map<String, String> private val header: Map<String, String>
get() { get() {
@ -30,16 +30,24 @@ class Tg189Search : Cloud() {
) )
val list: MutableList<Vod> = ArrayList() val list: MutableList<Vod> = ArrayList()
val html = OkHttp.string(url, header) val html = OkHttp.string(url, header)
val arr = html.split(":I".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() val json = Json.safeObject(html);
if (arr.isNotEmpty()) { json["results"].asJsonArray.forEach { element ->
for (s in arr) { val array = element.asString.split("$$$")
val doc = Jsoup.parse(s) if (array.size >= 2 && array[1].isNotEmpty()) {
val id = doc.select(" a").eachAttr("href") array[1].split("##").forEach {
.first { it.contains("189") || it.contains("139") }
val name=doc.select("strong").text()
val id = it.split("@")[0]
val pic = it.split("@")[1].split("$$")[0]
val name = it.split("@")[1].split("$$")[1]
list.add(Vod(id, name, pic, ""))
}
list.add(Vod(id, name, "", ""))
} }
} }

View File

@ -3,8 +3,8 @@ package com.github.catvod.spider
import com.github.catvod.bean.Result import com.github.catvod.bean.Result
import com.github.catvod.bean.Vod import com.github.catvod.bean.Vod
import com.github.catvod.net.OkHttp import com.github.catvod.net.OkHttp
import com.github.catvod.utils.Json
import com.github.catvod.utils.Util import com.github.catvod.utils.Util
import org.jsoup.Jsoup
import java.net.URLEncoder import java.net.URLEncoder
import java.nio.charset.Charset import java.nio.charset.Charset
@ -12,12 +12,11 @@ import java.nio.charset.Charset
* @author zhixc * @author zhixc
*/ */
class TgQuarkSearch : Cloud() { class TgQuarkSearch : Cloud() {
private val URL = "https://tg.252035.xyz/" private val URL = "https://tgsou.252035.xyz/"
private val header: Map<String, String> private val header: Map<String, String>
get() { get() {
val header: MutableMap<String, String> = val header: MutableMap<String, String> = HashMap()
HashMap()
header["User-Agent"] = Util.CHROME header["User-Agent"] = Util.CHROME
return header return header
} }
@ -27,23 +26,32 @@ class TgQuarkSearch : Cloud() {
override fun searchContent(key: String, quick: Boolean): String { override fun searchContent(key: String, quick: Boolean): String {
val url = val url =
URL + "?channelUsername=alyp_1,clouddriveresources,dianyingshare,hdhhd21,jdjdn1111,leoziyuan,NewQuark,PanjClub,Quark_Movies,xiangxiunb,yunpanchat,yunpanqk,XiangxiuNB,alyp_4K_Movies,alyp_Animation,alyp_TV,alyp_JLP&pic=true&keyword=" + URLEncoder.encode( URL + "?channelUsername=alyp_1,clouddriveresources,dianyingshare,hdhhd21,jdjdn1111,leoziyuan,NewQuark,PanjClub,Quark_Movies,xiangxiunb,yunpanchat,yunpanqk,XiangxiuNB,alyp_4K_Movies,alyp_Animation,alyp_TV,alyp_JLP&pic=true&keyword=" + URLEncoder.encode(
key, key, Charset.defaultCharset().name()
Charset.defaultCharset().name()
) )
val list: MutableList<Vod> = ArrayList() val list: MutableList<Vod> = ArrayList()
val html = OkHttp.string(url, header) val html = OkHttp.string(url, header)
val arr = html.split(":I".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() val json = Json.safeObject(html);
if (arr.size > 0) { json["results"].asJsonArray.forEach { element ->
for (s in arr) { val array = element.asString.split("$$$")
val doc = Jsoup.parse(s) if (array.size >= 2 && array[1].isNotEmpty()) {
val id = doc.select(" a").eachAttr("href") array[1].split("##").forEach {
.first { it.contains("189") || it.contains("139")|| it.contains("quark") }
val name=doc.select("strong").text()
list.add(Vod(id, name, "", "")) val id = it.split("@")[0]
val pic = it.split("@")[1].split("$$")[0]
val name = it.split("@")[1].split("$$")[1]
list.add(Vod(id, name, pic, ""))
}
} }
} }
return Result.string(list) return Result.string(list)
} }
} }

View File

@ -0,0 +1,56 @@
package com.github.catvod.spider
import com.github.catvod.bean.Result
import com.github.catvod.bean.Vod
import com.github.catvod.net.OkHttp
import com.github.catvod.utils.Json
import com.github.catvod.utils.Util
import java.net.URLEncoder
import java.nio.charset.Charset
/**
* @author zhixc
*/
class TgbaiduSearch : Cloud() {
private val URL = "https://tgsou.252035.xyz/"
private val header: Map<String, String>
get() {
val header: MutableMap<String, String> = HashMap()
header["User-Agent"] = Util.CHROME
return header
}
@Throws(Exception::class)
override fun searchContent(key: String, quick: Boolean): String {
val url =
URL + "?channelUsername=BaiduCloudDisk,bdwpzhpd,Baidu_Netdisk&pic=true&keyword=" + URLEncoder.encode(
key, Charset.defaultCharset().name()
)
val list: MutableList<Vod> = ArrayList()
val html = OkHttp.string(url, header)
val json = Json.safeObject(html);
json["results"].asJsonArray.forEach { element ->
val array = element.asString.split("$$$")
if (array.size >= 2 && array[1].isNotEmpty()) {
array[1].split("##").forEach {
val id = it.split("@")[0]
val pic = it.split("@")[1].split("$$")[0]
val name = it.split("@")[1].split("$$")[1]
list.add(Vod(id, name, pic, ""))
}
}
}
return Result.string(list)
}
}

View File

@ -52,7 +52,7 @@ public class QuarkTest {
@org.junit.Test @org.junit.Test
public void playerContent() throws Exception { public void playerContent() throws Exception {
String content = spider.playerContent("quark原画","a04522f504a742db8ebaf69e3b7f50d6++cf35e6096b5be563ed747a4538ceab60++469c2acf8640++lbhatsGLyszqGYVHwO+DJPeyRkwbsCr7JzcoZhPVYBI=",new ArrayList<>()); String content = spider.playerContent("quark原画", "a04522f504a742db8ebaf69e3b7f50d6++375807f3f1068a8fdabac127ec4db89f++469c2acf8640++PVTgPNXNtRFDDkE6SAYX4KPSjk9xl449JkTHl6mtu7k=", new ArrayList<>());
System.out.println("playerContent--" + content); System.out.println("playerContent--" + content);
JsonObject map = Json.safeObject(content); JsonObject map = Json.safeObject(content);
Gson gson = new GsonBuilder().setPrettyPrinting().create(); Gson gson = new GsonBuilder().setPrettyPrinting().create();

View File

@ -101,7 +101,43 @@
"searchable": 1, "searchable": 1,
"changeable": 1, "changeable": 1,
"ext": {} "ext": {}
}, { },
{
"key": "Tg123Search",
"name": "Tg123Search",
"type": 3,
"api": "csp_Tg123Search",
"searchable": 1,
"changeable": 1,
"ext": {}
},
{
"key": "TgbaiduSearch",
"name": "TgbaiduSearch",
"type": 3,
"api": "csp_TgbaiduSearch",
"searchable": 1,
"changeable": 1,
"ext": {}
},
{
"key": "Tg189Search",
"name": "Tg189Search",
"type": 3,
"api": "csp_Tg189Search",
"searchable": 1,
"changeable": 1,
"ext": {}
},
{
"key": "TgQuarkSearch",
"name": "TgQuarkSearch",
"type": 3,
"api": "csp_TgQuarkSearch",
"searchable": 1,
"changeable": 1,
"ext": {}
},{
"key": "TgSearchQuark", "key": "TgSearchQuark",
"name": "☁TgSearchQuark┃网盘", "name": "☁TgSearchQuark┃网盘",
"type": 3, "type": 3,
@ -110,6 +146,7 @@
"filterable": 0, "filterable": 0,
"ext": { "ext": {
"api_urls": [ "api_urls": [
"https://api.jkai.de/api/search",
"https://psweb.banye.tech:7777/api/search", "https://psweb.banye.tech:7777/api/search",
"https://so.566987.xyz/api/search", "https://so.566987.xyz/api/search",
"http://152.69.222.142:8088/api/search" "http://152.69.222.142:8088/api/search"
@ -128,6 +165,7 @@
"filterable": 0, "filterable": 0,
"ext": { "ext": {
"api_urls": [ "api_urls": [
"https://api.jkai.de/api/search",
"https://psweb.banye.tech:7777/api/search", "https://psweb.banye.tech:7777/api/search",
"https://so.566987.xyz/api/search", "https://so.566987.xyz/api/search",
"http://152.69.222.142:8088/api/search" "http://152.69.222.142:8088/api/search"
@ -146,6 +184,7 @@
"filterable": 0, "filterable": 0,
"ext": { "ext": {
"api_urls": [ "api_urls": [
"https://api.jkai.de/api/search",
"https://psweb.banye.tech:7777/api/search", "https://psweb.banye.tech:7777/api/search",
"https://so.566987.xyz/api/search", "https://so.566987.xyz/api/search",
"http://152.69.222.142:8088/api/search" "http://152.69.222.142:8088/api/search"
@ -164,6 +203,7 @@
"filterable": 0, "filterable": 0,
"ext": { "ext": {
"api_urls": [ "api_urls": [
"https://api.jkai.de/api/search",
"https://psweb.banye.tech:7777/api/search", "https://psweb.banye.tech:7777/api/search",
"https://so.566987.xyz/api/search", "https://so.566987.xyz/api/search",
"http://152.69.222.142:8088/api/search" "http://152.69.222.142:8088/api/search"
@ -181,6 +221,7 @@
"filterable": 0, "filterable": 0,
"ext": { "ext": {
"api_urls": [ "api_urls": [
"https://api.jkai.de/api/search",
"https://psweb.banye.tech:7777/api/search", "https://psweb.banye.tech:7777/api/search",
"https://so.566987.xyz/api/search", "https://so.566987.xyz/api/search",
"http://152.69.222.142:8088/api/search" "http://152.69.222.142:8088/api/search"