mirror of
https://github.com/qist/tvbox.git
synced 2025-10-26 17:52:20 +00:00
update CAT
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
0972096d206b7b978e5a8f0d70d6875a
|
6ae0f918642b9dbc80f6d08a7c2d24af
|
||||||
304
cat/dist/index.js
vendored
304
cat/dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
cat/dist/index.js.md5
vendored
2
cat/dist/index.js.md5
vendored
@@ -1 +1 @@
|
|||||||
c0fdca0e03d410e30fd736d1ae35ece7
|
2865f39bef57166410886fa1583f61e4
|
||||||
@@ -1,17 +1,6 @@
|
|||||||
{
|
{
|
||||||
"video": {
|
"video": {
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
|
||||||
"key": "feifan18",
|
|
||||||
"name": "🔞┃非凡资源18+┃🔞",
|
|
||||||
"api": "./js/feifan18.js",
|
|
||||||
"timeout": 30,
|
|
||||||
"ext": {
|
|
||||||
"box": "CatOpen"
|
|
||||||
},
|
|
||||||
"playerType": 0,
|
|
||||||
"type": 3
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "jable",
|
"key": "jable",
|
||||||
"name": "🔞┃Jable┃🔞",
|
"name": "🔞┃Jable┃🔞",
|
||||||
@@ -23,17 +12,6 @@
|
|||||||
"playerType": 0,
|
"playerType": 0,
|
||||||
"type": 3
|
"type": 3
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "liangzi18",
|
|
||||||
"name": "🔞┃量子资源18+┃🔞",
|
|
||||||
"api": "./js/liangzi18.js",
|
|
||||||
"timeout": 30,
|
|
||||||
"ext": {
|
|
||||||
"box": "CatOpen"
|
|
||||||
},
|
|
||||||
"playerType": 0,
|
|
||||||
"type": 3
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "sehuatang",
|
"key": "sehuatang",
|
||||||
"name": "🔞┃色花堂BT┃🔞",
|
"name": "🔞┃色花堂BT┃🔞",
|
||||||
|
|||||||
@@ -1,16 +1,5 @@
|
|||||||
{
|
{
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
|
||||||
"key": "feifan18",
|
|
||||||
"name": "🔞┃非凡资源18+┃🔞",
|
|
||||||
"api": "./js/feifan18.js",
|
|
||||||
"timeout": 30,
|
|
||||||
"ext": {
|
|
||||||
"box": "TVBox"
|
|
||||||
},
|
|
||||||
"playerType": 0,
|
|
||||||
"type": 3
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "jable",
|
"key": "jable",
|
||||||
"name": "🔞┃Jable┃🔞",
|
"name": "🔞┃Jable┃🔞",
|
||||||
@@ -22,17 +11,6 @@
|
|||||||
"playerType": 0,
|
"playerType": 0,
|
||||||
"type": 3
|
"type": 3
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "liangzi18",
|
|
||||||
"name": "🔞┃量子资源18+┃🔞",
|
|
||||||
"api": "./js/liangzi18.js",
|
|
||||||
"timeout": 30,
|
|
||||||
"ext": {
|
|
||||||
"box": "TVBox"
|
|
||||||
},
|
|
||||||
"playerType": 0,
|
|
||||||
"type": 3
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "sehuatang",
|
"key": "sehuatang",
|
||||||
"name": "🔞┃色花堂BT┃🔞",
|
"name": "🔞┃色花堂BT┃🔞",
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ class GitCafeSpider extends Spider {
|
|||||||
super();
|
super();
|
||||||
this.siteUrl = "https://www.alipansou.com"
|
this.siteUrl = "https://www.alipansou.com"
|
||||||
}
|
}
|
||||||
getSearchHeader(id) {
|
getHeaders(id) {
|
||||||
let headers = this.getHeader()
|
let headers = this.getHeader()
|
||||||
headers["Referer"] = id
|
headers["Referer"] = this.siteUrl + id
|
||||||
headers["Postman-Token"] = "5f1bb291-ce30-44c7-8885-6db1f3a50785"
|
headers["_bid"] = "6d14a5dd6c07980d9dc089a693805ad8"
|
||||||
headers["Host"] = "www.alipansou.com"
|
headers["Cookie"] = "_egg=70463dec0ec843b682ce18c36ec9ce91e"
|
||||||
return headers
|
return headers
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,11 +43,10 @@ class GitCafeSpider extends Spider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getHeader() {
|
getHeader() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"User-Agent":Utils.CHROME,
|
"User-Agent":Utils.CHROME,
|
||||||
"Connection": "keep-alive",
|
"Connection": "keep-alive"
|
||||||
"Cookie":"mysession=MTcxNTQwNTU3N3xEdi1CQkFFQ180SUFBUkFCRUFBQUxmLUNBQUVHYzNSeWFXNW5EQXdBQ25ObFlYSmphRjlyWlhrR2MzUnlhVzVuREFzQUNlZVVoT1dzbS1TOG9BPT183zSLJi-U9NmKMODipFB6EPuVUbUbmCgYTaJrdiPwsLU="}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getContentHtml() {
|
async getContentHtml() {
|
||||||
@@ -93,7 +92,7 @@ class GitCafeSpider extends Spider {
|
|||||||
|
|
||||||
async getAliUrl(id) {
|
async getAliUrl(id) {
|
||||||
let url = this.siteUrl + id.replace("/s/", "/cv/")
|
let url = this.siteUrl + id.replace("/s/", "/cv/")
|
||||||
let headers = this.getSearchHeader(url)
|
let headers = this.getHeaders(id)
|
||||||
let content = await req(url,{postType:"get",headers:headers,redirect:2})
|
let content = await req(url,{postType:"get",headers:headers,redirect:2})
|
||||||
await this.jadeLog.debug(`回复内容为:${JSON.stringify(content)}`)
|
await this.jadeLog.debug(`回复内容为:${JSON.stringify(content)}`)
|
||||||
// let url = await this.fetch(this.siteUrl + id.replace("/s/", "/cv/"), null, headers, true)
|
// let url = await this.fetch(this.siteUrl + id.replace("/s/", "/cv/"), null, headers, true)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* @Date : 2024/02/06 14:58
|
* @Date : 2024/02/06 14:58
|
||||||
* @Email : jadehh@1ive.com
|
* @Email : jadehh@1ive.com
|
||||||
* @Software : Samples
|
* @Software : Samples
|
||||||
* @Desc : 非凡资源
|
* @Desc : 非凡资源 (已失效)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {VodSpider} from "./vodSpider.js";
|
import {VodSpider} from "./vodSpider.js";
|
||||||
@@ -22,7 +22,7 @@ class FeiFanSpider extends VodSpider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getName() {
|
getName() {
|
||||||
return "🥗┃非凡资源┃🥗"
|
return `🥗┃非凡资源┃🥗`
|
||||||
}
|
}
|
||||||
|
|
||||||
getJSName() {
|
getJSName() {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* @Date : 2024/02/06 14:58
|
* @Date : 2024/02/06 14:58
|
||||||
* @Email : jadehh@1ive.com
|
* @Email : jadehh@1ive.com
|
||||||
* @Software : Samples
|
* @Software : Samples
|
||||||
* @Desc : 非凡资源
|
* @Desc : 非凡资源18+(已失效)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {VodSpider} from "./vodSpider.js";
|
import {VodSpider} from "./vodSpider.js";
|
||||||
@@ -22,7 +22,7 @@ class FeiFan18Spider extends VodSpider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getName() {
|
getName() {
|
||||||
return "🔞┃非凡资源18+┃🔞"
|
return `🔞┃非凡资源18+┃🔞`
|
||||||
}
|
}
|
||||||
|
|
||||||
getJSName() {
|
getJSName() {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* @Date : 2024/1/15 10:32
|
* @Date : 2024/1/15 10:32
|
||||||
* @Email : jadehh@1ive.com
|
* @Email : jadehh@1ive.com
|
||||||
* @Software : Samples
|
* @Software : Samples
|
||||||
* @Desc :
|
* @Desc : 爱看机器人(已失效:上盾)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Spider} from "./spider.js";
|
import {Spider} from "./spider.js";
|
||||||
@@ -62,7 +62,7 @@ class IKanBotSpider extends Spider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getName() {
|
getName() {
|
||||||
return "🤖┃爱看机器人┃🤖"
|
return `🤖┃爱看机器人┃🤖`
|
||||||
}
|
}
|
||||||
|
|
||||||
getAppName() {
|
getAppName() {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import * as Utils from "../lib/utils.js";
|
|||||||
class JiuJiuLiuSpider extends Spider {
|
class JiuJiuLiuSpider extends Spider {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.siteUrl = "https://www.ojig519d8se.icu"
|
this.siteUrl = "https://www.x9s8x.icu" // https://www.cs1369.com
|
||||||
}
|
}
|
||||||
|
|
||||||
getName() {
|
getName() {
|
||||||
@@ -35,212 +35,104 @@ class JiuJiuLiuSpider extends Spider {
|
|||||||
|
|
||||||
async parseVodShortListFromDoc($) {
|
async parseVodShortListFromDoc($) {
|
||||||
let vod_list = []
|
let vod_list = []
|
||||||
let vodElements = $("[class=\"stui-vodlist clearfix\"]").find("li")
|
let vodElements = $('[class="content-item"]')
|
||||||
for (const vodElement of vodElements) {
|
for (const vodElement of vodElements) {
|
||||||
let resource = $(vodElement).find("[class=\"stui-vodlist__thumb lazyload\"]")[0]
|
|
||||||
let vodShort = new VodShort()
|
let vodShort = new VodShort()
|
||||||
vodShort.vod_id = resource.attribs["href"]
|
let videoElement = $(vodElement).find("a")[0]
|
||||||
vodShort.vod_name = resource.attribs["title"]
|
vodShort.vod_id = videoElement.attribs["href"]
|
||||||
vodShort.vod_pic = resource.attribs["data-original"]
|
vodShort.vod_name = videoElement.attribs["title"]
|
||||||
vodShort.vod_remarks = $($(resource).find("[class=\"pic-text text-right\"]")[0]).text()
|
vodShort.vod_pic = $(videoElement).find("img")[0].attribs["data-original"]
|
||||||
|
vodShort.vod_remarks = $($(vodElement).find('[class="note text-bg-r"]')).text()
|
||||||
vod_list.push(vodShort)
|
vod_list.push(vodShort)
|
||||||
}
|
}
|
||||||
return vod_list
|
return vod_list
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async parseVodShortListFromDocBySearch($) {
|
|
||||||
let vod_list = []
|
|
||||||
let vodElements = $("[class=\"stui-pannel_bd\"]").find("li")
|
|
||||||
for (const vodElement of vodElements) {
|
|
||||||
let resource = $($(vodElement).find("[class=\"thumb\"]")[0]).find("a")[0]
|
|
||||||
let vodShort = new VodShort()
|
|
||||||
vodShort.vod_id = resource.attribs["href"]
|
|
||||||
vodShort.vod_name = resource.attribs["title"]
|
|
||||||
vodShort.vod_pic = resource.attribs["data-original"]
|
|
||||||
vodShort.vod_remarks = Utils.getStrByRegex(/类型:(.*?)地区/, $($(vodElement).find("[class=\"hidden-mi\"]")[0]).text())
|
|
||||||
vod_list.push(vodShort)
|
|
||||||
}
|
|
||||||
return vod_list
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async parseVodDetailFromDoc($) {
|
async parseVodDetailFromDoc($) {
|
||||||
let vodDetail = new VodDetail()
|
let vodDetail = new VodDetail()
|
||||||
let vodElement = $("[class=\"col-pd clearfix\"]")[1]
|
let detailElement = $('[class="row film_info clearfix"]')
|
||||||
let vodShortElement = $(vodElement).find("[class=\"stui-content__thumb\"]")[0]
|
vodDetail.vod_pic = $(detailElement).find("img")[0].attribs["data-original"]
|
||||||
|
vodDetail.vod_name = $($(detailElement).find('[class="c_pink text-ellipsis"]')).text()
|
||||||
|
let content = $( $(detailElement).find('[class="row"]')).text()
|
||||||
|
vodDetail.type_name = Utils.getStrByRegex(/视频类型(.*?)\n/,content).replaceAll(":","")
|
||||||
|
vodDetail.vod_area = Utils.getStrByRegex(/更新时间(.*?)\n/,content).replaceAll(":","")
|
||||||
|
let playVod = {}
|
||||||
|
let playElement = $('[class="btn btn-m btn-default"]')[0]
|
||||||
|
|
||||||
let vodItems = []
|
let vodItems = []
|
||||||
for (const playElement of $("[class=\"stui-content__playlist clearfix\"]").find("a")) {
|
const epName = vodDetail.vod_name;
|
||||||
let episodeUrl = this.siteUrl + playElement.attribs["href"];
|
const playUrl = playElement.attribs.href
|
||||||
let episodeName = $(playElement).text();
|
vodItems.push(epName + '$' + playUrl)
|
||||||
vodItems.push(episodeName + "$" + episodeUrl);
|
playVod[playElement.attribs.title] = vodItems.join('#')
|
||||||
}
|
vodDetail.vod_play_from = _.keys(playVod).join('$$$');
|
||||||
vodDetail.vod_name = $(vodShortElement).find("[class=\"stui-vodlist__thumb picture v-thumb\"]")[0].attribs["title"]
|
vodDetail.vod_play_url = _.values(playVod).join('$$$');
|
||||||
vodDetail.vod_pic = $(vodShortElement).find("img")[0].attribs["data-original"]
|
|
||||||
vodDetail.vod_remarks = $($(vodShortElement).find("[class=\"pic-text text-right\"]")[0]).text()
|
|
||||||
let data_str = $($(vodElement).find("[class=\"data\"]")).text().replaceAll(" ", " ")
|
|
||||||
vodDetail.type_name = Utils.getStrByRegex(/类型:(.*?) /, data_str)
|
|
||||||
vodDetail.vod_area = Utils.getStrByRegex(/地区:(.*?) /, data_str)
|
|
||||||
vodDetail.vod_year = Utils.getStrByRegex(/年份:(.*?) /, data_str)
|
|
||||||
vodDetail.vod_actor = Utils.getStrByRegex(/主演:(.*?) /, data_str)
|
|
||||||
vodDetail.vod_director = Utils.getStrByRegex(/导演:(.*?) /, data_str)
|
|
||||||
vodDetail.vod_content = $($("[class=\"stui-pannel_bd\"]").find("[class=\"col-pd\"]")).text()
|
|
||||||
vodDetail.vod_play_from = ["996"].join("$$$")
|
|
||||||
vodDetail.vod_play_url = [vodItems.join("#")].join("$$$")
|
|
||||||
return vodDetail
|
return vodDetail
|
||||||
}
|
}
|
||||||
|
|
||||||
async setClasses() {
|
async setClasses() {
|
||||||
let html = await this.fetch(this.siteUrl, null, this.getHeader(),false,false,0,true)
|
let $ = await this.getHtml(this.siteUrl,true);
|
||||||
if (html !== null) {
|
let menuElements = $('[class="row-item-title bg_red"]').find("a")
|
||||||
let $ = load(html)
|
|
||||||
let menuElements = $("[class=\"stui-header__menu type-slide\"]").find("a")
|
|
||||||
for (const menuElement of menuElements) {
|
for (const menuElement of menuElements) {
|
||||||
let type_dic = {
|
let type_name = $(menuElement).text()
|
||||||
"type_name": $(menuElement).text(),
|
let type_id = menuElement.attribs["href"]
|
||||||
"type_id": "/show/id/" + menuElement.attribs["href"].split("/").slice(-1)[0].split(".")[0]
|
if (type_name.indexOf("小说") === -1){
|
||||||
|
this.classes.push(this.getTypeDic(type_name, type_id))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($(menuElement).text() !== "首页") {
|
|
||||||
this.classes.push(type_dic)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
async getFilter($,index) {
|
||||||
}
|
let html = $.html()
|
||||||
let x = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
async getFilter($) {
|
|
||||||
let hdElements = $("[class=\"stui-pannel_hd\"]")
|
|
||||||
let extend_list = []
|
let extend_list = []
|
||||||
let index = 0
|
let extendElement = $($($($('[class="row-item-content"]')[index])).find('[class="item"]')).find("a")
|
||||||
for (let i = 0; i < 2; i++) {
|
let extend_dic = {"name":"排序","key":"sort","value":[]}
|
||||||
let cateElemet = hdElements[i]
|
for (const element of extendElement){
|
||||||
let typeElements = $(cateElemet).find("ul")
|
let type_name = $(element).text()
|
||||||
if (i === 0) {
|
let type_id = element.attribs["href"]
|
||||||
for (const typeElement of typeElements) {
|
extend_dic["value"].push(this.getFliterDic(type_name,type_id))
|
||||||
let extend_dic = {
|
|
||||||
"key": (index + 1).toString(), "name": $($(typeElement).find("li")[0]).text(), "value": []
|
|
||||||
}
|
|
||||||
for (const ele of $(typeElement).find("li").slice(1)) {
|
|
||||||
if (!_.isEmpty($(ele).text())) {
|
|
||||||
if (index === 0) {
|
|
||||||
extend_dic["value"].push({
|
|
||||||
"n": $(ele).text(),
|
|
||||||
"v": $(ele).find("a")[0].attribs["href"].split("/").slice(-1)[0].split(".")[0]
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
extend_dic["value"].push({"n": $(ele).text(), "v": $(ele).text()})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
extend_list.push(extend_dic)
|
extend_list.push(extend_dic)
|
||||||
index = index + 1
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
let extend_dic = {
|
|
||||||
"key": (index + 1).toString(), "name": $($(cateElemet).find("li")[0]).text(), "value": []
|
|
||||||
}
|
|
||||||
extend_dic["value"].push({"n": "全部", "v": "time"})
|
|
||||||
for (const ele of $(cateElemet).find("li").slice(1)) {
|
|
||||||
if (!_.isEmpty($(ele).text())) {
|
|
||||||
extend_dic["value"].push({
|
|
||||||
"n": $(ele).text(), "v": $(ele).find("a")[0].attribs["href"].split("/")[3]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
extend_list.push(extend_dic)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return extend_list
|
return extend_list
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async setFilterObj() {
|
async setFilterObj() {
|
||||||
|
let index = 0
|
||||||
for (const type_dic of this.classes) {
|
for (const type_dic of this.classes) {
|
||||||
let type_id = type_dic["type_id"]
|
let type_id = type_dic["type_id"]
|
||||||
if (type_id !== "/" && type_id !== "最近更新") {
|
if ( type_id !== "最近更新") {
|
||||||
let url = this.siteUrl + type_id + ".html"
|
let $ = await this.getHtml(this.siteUrl,true)
|
||||||
let html = await this.fetch(url, null, this.getHeader())
|
this.filterObj[type_id] = await this.getFilter($,index)
|
||||||
if (html != null) {
|
index = index + 1
|
||||||
let $ = load(html)
|
|
||||||
this.filterObj[type_id] = await this.getFilter($)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async setHomeVod() {
|
async setHomeVod() {
|
||||||
let html = await this.fetch(this.siteUrl, null, this.getHeader())
|
let $ = await this.getHtml(this.siteUrl,true)
|
||||||
if (html != null) {
|
|
||||||
let $ = load(html)
|
|
||||||
this.homeVodList = await this.parseVodShortListFromDoc($)
|
this.homeVodList = await this.parseVodShortListFromDoc($)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
getParams(params, value) {
|
|
||||||
let x = value ?? "全部"
|
|
||||||
if (x === "全部" || x === undefined) {
|
|
||||||
return ""
|
|
||||||
} else {
|
|
||||||
return params + value
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async setCategory(tid, pg, filter, extend) {
|
async setCategory(tid, pg, filter, extend) {
|
||||||
let typeName = this.getParams("/id/", extend["1"])
|
let $ = await this.getHtml(this.siteUrl + tid.replaceAll(".html",`/page/${pg}.html`),true)
|
||||||
if (_.isEmpty(typeName)) {
|
|
||||||
typeName = "/id/" + tid.split("/").slice(-1)[0]
|
|
||||||
}
|
|
||||||
let plot = this.getParams("/class/", extend["2"])
|
|
||||||
let area = this.getParams("/area/", extend["3"])
|
|
||||||
let year = this.getParams("/year/", extend["4"])
|
|
||||||
let language = this.getParams("/lang/ ", extend["5"])
|
|
||||||
let letter = this.getParams("/letter/ ", extend["6"])
|
|
||||||
let time = this.getParams("/by/", extend["7"])
|
|
||||||
let cateUrl = this.siteUrl + `/show${area}${time}${plot}${typeName}${language}${letter}${year}/page/${pg.toString()}.html`
|
|
||||||
await this.jadeLog.info(`类别URL为:${cateUrl}`)
|
|
||||||
this.limit = 36
|
|
||||||
let html = await this.fetch(cateUrl, null, this.getHeader())
|
|
||||||
if (html != null) {
|
|
||||||
let $ = load(html)
|
|
||||||
this.vodList = await this.parseVodShortListFromDoc($)
|
this.vodList = await this.parseVodShortListFromDoc($)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
async setDetail(id) {
|
async setDetail(id) {
|
||||||
let detailUrl = this.siteUrl + id
|
let $ = await this.getHtml(this.siteUrl + id,true)
|
||||||
let html = await this.fetch(detailUrl, null, this.getHeader())
|
|
||||||
if (html != null) {
|
|
||||||
let $ = load(html)
|
|
||||||
this.vodDetail = await this.parseVodDetailFromDoc($)
|
this.vodDetail = await this.parseVodDetailFromDoc($)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
async setSearch(wd, quick) {
|
|
||||||
let searchUrl = this.siteUrl + `/search.html?wd=${wd}`
|
|
||||||
let html = await this.fetch(searchUrl, null, this.getHeader())
|
|
||||||
if (html != null) {
|
|
||||||
let $ = load(html)
|
|
||||||
this.vodList = await this.parseVodShortListFromDocBySearch($)
|
|
||||||
}
|
|
||||||
|
|
||||||
let x = 0
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async setPlay(flag, id, flags) {
|
async setPlay(flag, id, flags) {
|
||||||
let html = await this.fetch(id, null, this.getHeader())
|
let $ = await this.getHtml(this.siteUrl+id,true)
|
||||||
if (html !== null) {
|
let playerConfig = JSON.parse(Utils.getStrByRegex(/var player_aaaa=(.*?)<\/script>/,$.html()))
|
||||||
let matcher = Utils.getStrByRegex(/player_aaaa=(.*?)<\/script>/, html)
|
this.playUrl = playerConfig["url"]
|
||||||
let player = JSON.parse(matcher);
|
|
||||||
try {
|
|
||||||
this.playUrl = decodeURIComponent(Crypto.enc.Utf8.stringify(Crypto.enc.Base64.parse(player["url"])))
|
|
||||||
this.header = this.getHeader()
|
|
||||||
} catch (e) {
|
|
||||||
this.playUrl = player["url"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* @Date : 2024/1/24 9:15
|
* @Date : 2024/1/24 9:15
|
||||||
* @Email : jadehh@1ive.com
|
* @Email : jadehh@1ive.com
|
||||||
* @Software : Samples
|
* @Software : Samples
|
||||||
* @Desc : 量子资源
|
* @Desc : 量子资源(已失效)
|
||||||
*/
|
*/
|
||||||
import {VodSpider} from "./vodSpider.js";
|
import {VodSpider} from "./vodSpider.js";
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ class LiangziSpider extends VodSpider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getName() {
|
getName() {
|
||||||
return "🐝┃量子资源┃🐝"
|
return `🐝┃量子资源┃🐝`
|
||||||
}
|
}
|
||||||
|
|
||||||
getJSName() {
|
getJSName() {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* @Date : 2024/1/24 9:15
|
* @Date : 2024/1/24 9:15
|
||||||
* @Email : jadehh@1ive.com
|
* @Email : jadehh@1ive.com
|
||||||
* @Software : Samples
|
* @Software : Samples
|
||||||
* @Desc : 量子资源18
|
* @Desc : 量子资源18+ (已失效)
|
||||||
*/
|
*/
|
||||||
import {VodSpider} from "./vodSpider.js";
|
import {VodSpider} from "./vodSpider.js";
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ class Liangzi18Spider extends VodSpider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getName() {
|
getName() {
|
||||||
return "🔞┃量子资源18+┃🔞"
|
return `🔞┃量子资源18+┃🔞`
|
||||||
}
|
}
|
||||||
|
|
||||||
getJSName() {
|
getJSName() {
|
||||||
|
|||||||
@@ -20,6 +20,19 @@ class DyttSpider extends Spider {
|
|||||||
this.dyttReconnectTimes = 0
|
this.dyttReconnectTimes = 0
|
||||||
|
|
||||||
}
|
}
|
||||||
|
async spiderInit(inReq=null) {
|
||||||
|
if (inReq !== null){
|
||||||
|
this.jsBase = await js2Proxy(inReq,"detail",this.getHeader());
|
||||||
|
}else{
|
||||||
|
this.jsBase = await js2Proxy(true, this.siteType, this.siteKey, 'detail/', this.getHeader());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async init(cfg) {
|
||||||
|
await super.init(cfg);
|
||||||
|
await this.spiderInit(null)
|
||||||
|
}
|
||||||
|
|
||||||
getName() {
|
getName() {
|
||||||
return "🍚┃Mp4电影┃🍚"
|
return "🍚┃Mp4电影┃🍚"
|
||||||
@@ -91,7 +104,7 @@ class DyttSpider extends Spider {
|
|||||||
let vodShort = new VodShort();
|
let vodShort = new VodShort();
|
||||||
vodShort.vod_name = vodElement.attribs.title
|
vodShort.vod_name = vodElement.attribs.title
|
||||||
vodShort.vod_id = vodElement.attribs.href
|
vodShort.vod_id = vodElement.attribs.href
|
||||||
vodShort.vod_pic = this.detailProxy + Utils.base64Encode(vodShort.vod_id)
|
vodShort.vod_pic = this.jsBase + Utils.base64Encode(vodShort.vod_id)
|
||||||
vod_list.push(vodShort)
|
vod_list.push(vodShort)
|
||||||
}
|
}
|
||||||
return vod_list
|
return vod_list
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ class Spider {
|
|||||||
return await this.getResponse(reqUrl, params, headers, redirect_url, return_cookie, buffer, response,proxy)
|
return await this.getResponse(reqUrl, params, headers, redirect_url, return_cookie, buffer, response,proxy)
|
||||||
} else {
|
} else {
|
||||||
await this.jadeLog.error(`请求失败,失败原因为:状态码出错,请求url为:${uri},回复内容为:${JSON.stringify(response)}`)
|
await this.jadeLog.error(`请求失败,失败原因为:状态码出错,请求url为:${uri},回复内容为:${JSON.stringify(response)}`)
|
||||||
return await this.reconnnect(reqUrl, params, headers, redirect_url, return_cookie, buffer)
|
return await this.reconnnect(reqUrl, params, headers, redirect_url, return_cookie, buffer, response,proxy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {__jsEvalReturn} from './wogg.js';
|
import {__jsEvalReturn} from './jiujiuliu.js';
|
||||||
|
|
||||||
import * as Utils from "../lib/utils.js";
|
import * as Utils from "../lib/utils.js";
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ async function testMusicPlay(vodDetail) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function test() {
|
async function test() {
|
||||||
let siteKey = 'wogg';
|
let siteKey = 'jiujiuliu';
|
||||||
let siteType = 3;
|
let siteType = 3;
|
||||||
await spider.init({
|
await spider.init({
|
||||||
skey: siteKey, stype: siteType, ext: {
|
skey: siteKey, stype: siteType, ext: {
|
||||||
@@ -68,22 +68,6 @@ async function test() {
|
|||||||
let classes = JSON.parse(await spider.home(true));
|
let classes = JSON.parse(await spider.home(true));
|
||||||
console.debug(JSON.stringify(classes))
|
console.debug(JSON.stringify(classes))
|
||||||
|
|
||||||
// 测试详情
|
|
||||||
let detail1 = JSON.parse(await spider.detail('/index.php/voddetail/84217.html'))
|
|
||||||
await testPlay(detail1)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 测试搜索
|
|
||||||
let search_page = JSON.parse(await spider.search("庆余年", false, 1))
|
|
||||||
console.debug(JSON.stringify(search_page))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//测试首页列表
|
//测试首页列表
|
||||||
@@ -94,17 +78,30 @@ async function test() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 测试分类
|
// 测试分类
|
||||||
let catePage = JSON.parse(await spider.category("2", "1", undefined, {}));
|
let catePage = JSON.parse(await spider.category("/vod/type/id/1.html", "1", undefined, {}));
|
||||||
console.debug(JSON.stringify(catePage))
|
console.debug(JSON.stringify(catePage))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 测试详情
|
||||||
|
let detail1 = JSON.parse(await spider.detail("/detail/192466.html"))
|
||||||
|
await testPlay(detail1)
|
||||||
|
|
||||||
|
|
||||||
|
// 测试搜索
|
||||||
|
let search_page = JSON.parse(await spider.search("庆余年", false, 1))
|
||||||
|
console.debug(JSON.stringify(search_page))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -80,17 +80,6 @@
|
|||||||
"playerType": 0,
|
"playerType": 0,
|
||||||
"type": 3
|
"type": 3
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "feifan",
|
|
||||||
"name": "🥗┃非凡资源┃🥗",
|
|
||||||
"api": "./js/feifan.js",
|
|
||||||
"timeout": 30,
|
|
||||||
"ext": {
|
|
||||||
"box": "CatOpen"
|
|
||||||
},
|
|
||||||
"playerType": 0,
|
|
||||||
"type": 3
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "huya",
|
"key": "huya",
|
||||||
"name": "🐯┃虎牙直播┃🐯",
|
"name": "🐯┃虎牙直播┃🐯",
|
||||||
@@ -193,18 +182,6 @@
|
|||||||
"playerType": 0,
|
"playerType": 0,
|
||||||
"type": 3
|
"type": 3
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "liangzi",
|
|
||||||
"name": "🐝┃量子资源┃🐝",
|
|
||||||
"api": "./js/liangzi.js",
|
|
||||||
"timeout": 30,
|
|
||||||
"ext": {
|
|
||||||
"box": "CatOpen",
|
|
||||||
"code": 0
|
|
||||||
},
|
|
||||||
"playerType": 0,
|
|
||||||
"type": 3
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "bilibili",
|
"key": "bilibili",
|
||||||
"name": "🏰┃哔哩哔哩┃🏰",
|
"name": "🏰┃哔哩哔哩┃🏰",
|
||||||
@@ -300,17 +277,6 @@
|
|||||||
"playerType": 0,
|
"playerType": 0,
|
||||||
"type": 3
|
"type": 3
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "ikanbot",
|
|
||||||
"name": "🤖┃爱看机器人┃🤖",
|
|
||||||
"api": "./js/ikanbot.js",
|
|
||||||
"timeout": 30,
|
|
||||||
"ext": {
|
|
||||||
"box": "CatOpen"
|
|
||||||
},
|
|
||||||
"playerType": 0,
|
|
||||||
"type": 3
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "cilixiong",
|
"key": "cilixiong",
|
||||||
"name": "🐻┃磁力熊┃🐻",
|
"name": "🐻┃磁力熊┃🐻",
|
||||||
|
|||||||
@@ -79,17 +79,6 @@
|
|||||||
"playerType": 0,
|
"playerType": 0,
|
||||||
"type": 3
|
"type": 3
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "feifan",
|
|
||||||
"name": "🥗┃非凡资源┃🥗",
|
|
||||||
"api": "./js/feifan.js",
|
|
||||||
"timeout": 30,
|
|
||||||
"ext": {
|
|
||||||
"box": "TVBox"
|
|
||||||
},
|
|
||||||
"playerType": 0,
|
|
||||||
"type": 3
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "huya",
|
"key": "huya",
|
||||||
"name": "🐯┃虎牙直播┃🐯",
|
"name": "🐯┃虎牙直播┃🐯",
|
||||||
@@ -192,18 +181,6 @@
|
|||||||
"playerType": 0,
|
"playerType": 0,
|
||||||
"type": 3
|
"type": 3
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "liangzi",
|
|
||||||
"name": "🐝┃量子资源┃🐝",
|
|
||||||
"api": "./js/liangzi.js",
|
|
||||||
"timeout": 30,
|
|
||||||
"ext": {
|
|
||||||
"box": "TVBox",
|
|
||||||
"code": 0
|
|
||||||
},
|
|
||||||
"playerType": 0,
|
|
||||||
"type": 3
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "bilibili",
|
"key": "bilibili",
|
||||||
"name": "🏰┃哔哩哔哩┃🏰",
|
"name": "🏰┃哔哩哔哩┃🏰",
|
||||||
@@ -299,17 +276,6 @@
|
|||||||
"playerType": 0,
|
"playerType": 0,
|
||||||
"type": 3
|
"type": 3
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "ikanbot",
|
|
||||||
"name": "🤖┃爱看机器人┃🤖",
|
|
||||||
"api": "./js/ikanbot.js",
|
|
||||||
"timeout": 30,
|
|
||||||
"ext": {
|
|
||||||
"box": "TVBox"
|
|
||||||
},
|
|
||||||
"playerType": 0,
|
|
||||||
"type": 3
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "cilixiong",
|
"key": "cilixiong",
|
||||||
"name": "🐻┃磁力熊┃🐻",
|
"name": "🐻┃磁力熊┃🐻",
|
||||||
|
|||||||
Reference in New Issue
Block a user