From c2d6edbec208138de863f3340673306cf93e40ac Mon Sep 17 00:00:00 2001 From: Corner Date: Wed, 11 Dec 2024 16:21:06 +0800 Subject: [PATCH] feat: DUB 2 --- jar/spider.jar | Bin 513597 -> 520055 bytes json/config.json | 11 ++- json/configAll.json | 2 +- src/main/java/com/github/catvod/spider/DUB.kt | 73 +++++++++++++++--- src/test/java/DUBTest.kt | 6 +- src/test/java/common/Util.java | 10 ++- 6 files changed, 88 insertions(+), 14 deletions(-) diff --git a/jar/spider.jar b/jar/spider.jar index 94f3043ba2aae04a066c3c0cc7941eaf7b86c253..6a606fa6a4ae9679adff2dab0ba679f5b004c127 100644 GIT binary patch delta 12843 zcmZX42Rv2(|Np($z4s6z$zEB>$WF2oA)90-MM+AEvg#ViUKvNScSg2bnVE%b$)1Hm zDkYNs$2q6Z=ll8p^w53wdOctJ{XX~fc)#n4xHl%bX$?+`w?G=#nj!DVe-;`nz}5A+=BsKjj_9IJQy7c5M%rNDq)jg ze-H~ZFFi^7bXpmM@ecxf&k_D%5-RlXTPg2SV~d((;Lo|HW3VY#^92gnRM^OX<`W)+ zIZOj(bTF%=jR1>FB+pmg#$hm5@UdlU2P-B!LvgU()ov#u4Bid4B9ioBRti{BJ9-FF zeVEQiBr)?T2uE_k7?C{qsEdH1m2O0pyS9ZSV#vPioV!-eE z2a{W{LSQcwmdHkd`FAwCU3E`+e@>7FgPG@ujrqt^vGYe6?mt?b#z!(Kr`h+M*+#KHNUm`Z=D0OfZK|CdJviX=ff7CT}!V5i`R zF{uAsj{)HS^gok#^Q|owgE7Rx#t?^^eCaCI70Gne8T$tAF1f%J+X^=jnPp=#Km^m> zkOtA7J^BoavV)MlzwW3pi+va)K_Y008!; z005af1Y3ldy$HolASfvutByFBj>Oti!<~bsEdlZmbYxOF?y-mVzug{ih6aa310#B{ z4CEtySU04=oFS|-T;T2+P=EvRk7LJ>mF@p)@5o`ufhQ$A{JrB?0Bpqw}YZLB4dEXyBkG@LB-Se4#oRn6f1kemgX zB*P{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J3{IvZJj{5^OaCvxh2+bWx-)VY}z%W3gjv_Jb*aE13-xvj9Sg$g3Cu&p= zVss1lgTX#(r-L0CrCD8w*8|)S1nj5Y?;b~spGxz+-Ah1;CN3S=k$n094+g54=+Nd% zsdkj=*Nb{+8>1E+Q0&O72Yk|uAJT*aw=-AZLq2JXG%McCtR9JUmbaAho{OEKKh)9o z{7&Db-FhWheSq=1sS4CGV2fYw7+TAmf7J5nVU0QoSZO$ZfJm3Z$8?zu=_P1#lnEa1 z;EVNq2Q6zsBC|g4;4{$@HrX?XrV0N?n%Xo*o!N=qA=jq)Pd@LU#W&L8J$mKZl)+J9&4iJ88nCbIfJbg`HrMJiDm%!bN6X*@bOD`v(Mhak@p`3@ zqdoLnP|cD@E#h?(a*KY3Q$uKS|7(fawBs4{*R)q9)-hO^x4>)l(shwuTQ+&Gk6al% z1BvvT82H}>EjIPhO1X?qK@t6>Ux~c=IT8D8I|+V-ZB09cPGR&cLFnE^DZ+mN_k$On diff --git a/json/config.json b/json/config.json index 6e4468a..9419450 100644 --- a/json/config.json +++ b/json/config.json @@ -1,5 +1,5 @@ { - "spider": "../jar/spider.jar;md5;92ca9354dbc6a80563a500663ed2491e", + "spider": "../jar/spider.jar;md5;198903037572d4d7d5e030a14792ab76", "sites": [ { "key": "Douban", @@ -37,6 +37,15 @@ "changeable": 0, "ext": {} }, + { + "key": "DUB", + "name": "DUB", + "type": 3, + "api": "csp_DUB", + "searchable": 0, + "changeable": 0, + "ext": {} + }, { "key": "QxiTv", "name": "七喜 | 影视", diff --git a/json/configAll.json b/json/configAll.json index 5f76213..802bbe0 100644 --- a/json/configAll.json +++ b/json/configAll.json @@ -1,5 +1,5 @@ { - "spider": "../jar/spider.jar;md5;92ca9354dbc6a80563a500663ed2491e", + "spider": "../jar/spider.jar;md5;198903037572d4d7d5e030a14792ab76", "sites": [ { "key": "Douban", diff --git a/src/main/java/com/github/catvod/spider/DUB.kt b/src/main/java/com/github/catvod/spider/DUB.kt index 75b9f7b..ca9cc3e 100644 --- a/src/main/java/com/github/catvod/spider/DUB.kt +++ b/src/main/java/com/github/catvod/spider/DUB.kt @@ -1,25 +1,35 @@ +package com.github.catvod.spider + +import cn.hutool.core.codec.Base64 import com.github.catvod.bean.Class import com.github.catvod.bean.Result import com.github.catvod.bean.Vod import com.github.catvod.bean.Vod.VodPlayBuilder.PlayUrl import com.github.catvod.crawler.Spider +import com.github.catvod.crawler.SpiderDebug import com.github.catvod.net.OkHttp +import com.github.catvod.utils.Image +import com.github.catvod.utils.Json import com.github.catvod.utils.Utils import org.jsoup.Jsoup import org.jsoup.select.Elements -import java.util.HashMap +import java.net.URLDecoder +import java.net.URLEncoder +import java.util.* class DUB: Spider() { private val host = Utils.base64Decode("aHR0cHM6Ly90di5nYm9rdS5jb20v") private val cateFormat = "/vodtype/%s.html" // tid-page private val cateFormat2 = "/vodtype/%s-%s.html" // tid-page - private var referer = "duboku.tv" + private var referer = Utils.base64Decode("YzNSaGRHbGpMM0JzWVhsbGNpOTJhV1JxY3pJMUxuQm9jQT09") + private val signUrl = Utils.base64Decode("c3RhdGljL3BsYXllci92aWRqczI1LnBocA==") + private val searchUrl = Utils.base64Decode("L3ZvZHNlYXJjaC8tLS0tLS0tLS0tLS0tLmh0bWw/d2Q9JXMmc3VibWl0PQ==") // private val classList = Class.parseFromFormatStr("") override fun homeContent(filter: Boolean): String { - val result = OkHttp.string("https://tv.gboku.com/vodtype/1.html", Utils.webHeaders("duboku.tv")) -// val result = OkHttp.string("$host/vodtype/2.html", Utils.webHeaders("duboku.tv")) +// val result = OkHttp.string("https://tv.gboku.com/vodtype/1.html", Utils.webHeaders("duboku.tv")) + val result = OkHttp.string("$host/vodtype/2.html", Utils.webHeaders("duboku.tv")) val document = Jsoup.parse(result) val select = document.select("ul.nav-list > li") @@ -32,7 +42,7 @@ class DUB: Spider() { } override fun categoryContent(tid: String?, pg: String?, filter: Boolean, extend: HashMap?): String { - var url = "" + var url: String if(pg == "1"){ url = cateFormat.format(tid) }else{ @@ -50,7 +60,7 @@ class DUB: Spider() { vod.apply { setVodRemarks(fa.text()) setVodId(fa.attr("href")) - setVodPic(fa.attr("data-original")) + setVodPic(Image.UrlHeaderBuilder(fa.attr("data-original")).referer(referer).build()) setVodName(fa.attr("title")) } vodList.add(vod) @@ -59,7 +69,9 @@ class DUB: Spider() { } override fun detailContent(ids: MutableList): String { - val string = OkHttp.string("$host${ids[0]}", Utils.webHeaders(referer)) + val u = "$host${ids[0]}" + val string = OkHttp.string(u, Utils.webHeaders(referer)) + referer = u val document = Jsoup.parse(string) val detail = document.select(".myui-content__detail") val vod = Vod() @@ -106,15 +118,56 @@ class DUB: Spider() { override fun searchContent(key: String?, quick: Boolean): String { - return super.searchContent(key, quick) + val string = + OkHttp.string("$host${searchUrl.format(URLEncoder.encode(key, "UTF-8"))}", Utils.webHeaders(referer)) + val document = Jsoup.parse(string) + val select = document.select("ul#searchList > li") + val vodList = mutableListOf() + for (element in select) { + vodList.add(Vod().apply { + val text = element.select("a.searchKey") + setVodName(text.text()) + setVodId(text.attr("href")) + val thumb = element.select(".thumb > a") + setVodPic(Image.UrlHeaderBuilder(thumb.attr("data-original")).referer(referer).build()) + setVodRemarks(thumb.select(".tag").text()) + }) + } + return Result.string(vodList) } override fun searchContent(key: String?, quick: Boolean, pg: String?): String { return super.searchContent(key, quick, pg) } - override fun playerContent(flag: String?, id: String?, vipFlags: MutableList?): String { - return super.playerContent(flag, id, vipFlags) + @OptIn(ExperimentalStdlibApi::class) + override fun playerContent(flag: String?, id: String, vipFlags: MutableList?): String { + val string = OkHttp.string("$host$id") + val regex = Regex("var\\s*player_[a-z]{0,4}\\s*=\\s*([^<]+)") + val data = regex.find(string) + var url = "" + if((data?.groupValues?.size ?: 0) > 0){ + val parse = Json.parse(data!!.groupValues[1]) + val rst = parse.asJsonObject + val encrypt = rst.get("encrypt").asInt + url = if(encrypt == 2){ + URLDecoder.decode(Base64.decodeStr(rst.get("url").asString), "UTF-8") + }else{ + URLDecoder.decode(rst.get("url").asString, "UTF-8") + } + }else{ + SpiderDebug.log("DUB 获取播放链接失败 $string") + } + + val signDocument = OkHttp.string("$host$signUrl", Utils.webHeaders(referer)) + val signRegx = Regex("encodeURIComponent\\s*\\(\\s*[\"']([^\"']+)[\"']\\s*\\)") + val find = signRegx.find(signDocument) + if((find?.groupValues?.size ?: 0) > 0){ + val sign = find!!.groupValues[1] + return Result.get().url("$url?sign=${URLEncoder.encode(sign, "UTF-8")}").string() + } + SpiderDebug.log("DUB 获取签名失败") + return Result.error("获取播放链接失败") } } \ No newline at end of file diff --git a/src/test/java/DUBTest.kt b/src/test/java/DUBTest.kt index cf3520d..f0cc166 100644 --- a/src/test/java/DUBTest.kt +++ b/src/test/java/DUBTest.kt @@ -1,5 +1,6 @@ import cn.hutool.core.lang.Assert import com.github.catvod.bean.Result +import com.github.catvod.spider.DUB import common.TestInterface import org.junit.jupiter.api.Test @@ -32,12 +33,15 @@ class DUBTest:TestInterface { assert(detailContent) } + @Test override fun playTest() { val playerContent = t.playerContent("", "/vodplay/5067-1-1.html", mutableListOf()) assert(playerContent) } + @Test override fun searchTest() { - TODO("Not yet implemented") + val searchContent = t.searchContent("庆余年", false) + assert(searchContent) } } \ No newline at end of file diff --git a/src/test/java/common/Util.java b/src/test/java/common/Util.java index 0a03cf2..9782dd2 100644 --- a/src/test/java/common/Util.java +++ b/src/test/java/common/Util.java @@ -1,5 +1,6 @@ package common; +import cn.hutool.core.codec.Base64; import cn.hutool.core.io.FileUtil; import cn.hutool.http.HtmlUtil; import com.github.catvod.utils.Utils; @@ -14,7 +15,7 @@ public class Util { @Test public void strEncode(){ - String s = "/api.php/provide/search_result"; + String s = "/vodsearch/-------------.html?wd=%s&submit="; System.out.println(Utils.base64Encode(s)); } @@ -34,6 +35,13 @@ public void md5Test(){ System.out.println(s1); } + @Test + public void decodeTest(){ + String s = "JTY4JTc0JTc0JTcwJTczJTNBJTJGJTJGJTc0JTMyJTMwJTZEJTJFJTZFJTYyJTZGJTZCJTc1JTJFJTYzJTZGJTZEJTJGJTMyJTMwJTMyJTM0JTMxJTMyJTMwJTM2JTJGJTRGJTQzJTZGJTU3JTM1JTUyJTU2JTU0JTJGJTY5JTZFJTY0JTY1JTc4JTJFJTZEJTMzJTc1JTM4"; + String s1 = Base64.decodeStr(s); + System.out.println(s1); + } + @Test public void htmlEncode(){ String html = FileUtil.readString(new File("E:\\Archives\\compose-mutiplatform-workspace\\Test\\https __www.yjys.me_.htm"), "utf-8");