mirror of https://github.com/qist/tvbox.git
parent
589dd3767f
commit
1baa80d487
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,237 @@
|
||||
globalThis.getTime = function(){
|
||||
let ts= Math.round(new Date().getTime()/1000).toString();
|
||||
log('获取时间戳:'+ts);
|
||||
return ts
|
||||
}
|
||||
|
||||
globalThis.signUrl=function(json){
|
||||
// 获取所有节点的名称并按字母顺序排序
|
||||
let json1=JSON.parse(json);
|
||||
var sortedKeys = Object.keys(json1).sort();
|
||||
// 遍历排好序的节点名称列表,并打印相应的值
|
||||
let s='';
|
||||
for (let key in sortedKeys){
|
||||
let value=json1[sortedKeys[key]];
|
||||
if(value!=undefined){
|
||||
s=s+value;
|
||||
}
|
||||
}
|
||||
//log(s);
|
||||
//log(md5(s+"alskeuscli"));
|
||||
s=json.slice(0,-1)+",\"sign\":\""+md5(s+"alskeuscli")+"\"\}";
|
||||
log(s);
|
||||
return s;
|
||||
}
|
||||
|
||||
globalThis.posturl=function(url,json){
|
||||
let html= fetch(url, {
|
||||
body: JSON.parse(signUrl(json)),
|
||||
headers: {"User-Agent": "okhttp/3.12.3"},
|
||||
method: "POST"
|
||||
}, true);
|
||||
return JSON.parse(html);
|
||||
}
|
||||
var rule = {
|
||||
title: '喵次元[APP]',
|
||||
host: 'https://cym.zhui.la/api.php',
|
||||
hostJs:`
|
||||
var json2 = '{"versionName":"5.6.9","uuid":"9cc01079c64e2495","version":"4835d0a2","versionCode":"35","ctime":"'+getTime()+'"}';
|
||||
let url="https://cym.zhui.la/api.php/type/get_list";
|
||||
let jo=posturl(url,json2).data.list;
|
||||
let filters = {};
|
||||
let cb={"class":"类型","area":"地区","lang":"语言","year":"年份","star":"演员","director":"导演","state":"状态","version":"版本"};
|
||||
let class1=[];
|
||||
jo.forEach(function(tp) {
|
||||
rule.class_name=rule.class_name +"&"+tp['type_name'];
|
||||
rule.class_url=rule.class_url +"&"+tp['type_id'];
|
||||
let ep=tp['type_extend'];
|
||||
let classes = [];
|
||||
for (let key in ep){
|
||||
let value=ep[key];
|
||||
|
||||
if (value.length>1){
|
||||
class1.append(key);
|
||||
//写成{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"}]}这种格式
|
||||
let dd=value.toString().split(',');
|
||||
var s=[];
|
||||
dd.forEach(function(i){
|
||||
s.append({'n':i,'v':i});
|
||||
})
|
||||
let ss={"key":key,"name":cb[key],"value":s};
|
||||
classes.append(ss);
|
||||
}
|
||||
}
|
||||
filters[tp['type_id']]=classes;
|
||||
});
|
||||
class1=Array.from(new Set(class1)).sort();
|
||||
let s=""
|
||||
class1.forEach(function(tp) {
|
||||
s=s+"&" + tp +"={{fl."+tp+"}}";
|
||||
})
|
||||
log(s);
|
||||
rule.filter_url=s;
|
||||
rule.filter=filters;
|
||||
log(rule.filter);
|
||||
log(rule.class_name);
|
||||
log(rule.class_url);
|
||||
`,
|
||||
|
||||
homeUrl:'?hpindigo=**&page=fypage',
|
||||
url:'?t=fyclass&page=fypage',
|
||||
filter_url:'',
|
||||
filter: {},
|
||||
detailUrl:'?ids=',
|
||||
searchUrl: '?hpindigo=**&page=fypage',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable:1,//是否启用分类筛选,
|
||||
headers:{'User-Agent':'MOBILE_UA'},
|
||||
timeout:10000,
|
||||
class_name:'全部', // 分类筛选 /api.php/app/nav
|
||||
class_url:'0',
|
||||
play_parse:true,
|
||||
lazy:`js:
|
||||
log("*************测试*************");
|
||||
let dd=input.split("&");
|
||||
let ju_id=dd[0];
|
||||
let plyer=dd[1];
|
||||
let video_id=dd[2];
|
||||
var json2 = '{"player_id":"'+plyer+'","ju_id":"'+ju_id+'","vod_id":"'+video_id+'","versionName":"5.6.9","uuid":"3899af59c0b12b98","version":"4835d0a2","versionCode":"35","ctime":"'+getTime()+'"}';
|
||||
let url="https://cym.zhui.la/api.php/video/get_definition";
|
||||
let html = posturl(url,json2).data[0].url.trim();
|
||||
log(html);
|
||||
//input=aesX("AES/CBC/PKCS7",false,html,true,"sLunqcoH85Nm/jDmFKns7A==","fedcba9876543210",false);
|
||||
//log(input);
|
||||
eval(getCryptoJS);
|
||||
var key = CryptoJS.enc.Hex.parse("734C756E71636F4838354E6D2F6A446D464B6E7337413D3D0000000000000000");
|
||||
var iv = CryptoJS.enc.Utf8.parse("fedcba9876543210");
|
||||
input=(CryptoJS.AES.decrypt(html, key, {
|
||||
iv: iv,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
})).toString(CryptoJS.enc.Utf8)
|
||||
log(input)
|
||||
`,
|
||||
//lazy:'js:input=/m3u8|mp4|flv/.test(input)?{jx:0,url:input,parse:0}:{jx:1,url:input,parse:1}',
|
||||
limit:6,
|
||||
// 推荐:'json:items;*;*;*;*',
|
||||
推荐:'json:data.sections[0].items;*;*;*;*',
|
||||
推荐:`js:
|
||||
log(input);
|
||||
let page=input.split("&")[1].split("=")[1];
|
||||
log(page);
|
||||
var json2 = '{"page":"'+page+'","versionName":"5.6.9","uuid":"9cc01079c64e2495","version":"4835d0a2","versionCode":"35","ctime":"'+getTime()+'"}';
|
||||
let url="https://cym.zhui.la/api.php/video/index";
|
||||
let jo = posturl(url,json2);
|
||||
let vodList = jo.data;
|
||||
log(vodList);
|
||||
let videos=[];
|
||||
vodList.forEach(function(vod) {
|
||||
vod.video.forEach(function(vod1) {
|
||||
let aid = (vod1["vod_id"]);
|
||||
let title = vod1["vod_name"];
|
||||
let img = vod1["vod_pic"];
|
||||
let remark = vod1["vod_remarks"];
|
||||
videos.push({
|
||||
vod_id: aid,
|
||||
vod_name: title,
|
||||
vod_pic: img,
|
||||
vod_remarks: remark
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
VODS=videos;
|
||||
`,
|
||||
一级:`js:
|
||||
log(input);
|
||||
let canshu=input.split("?")[1].split("&");
|
||||
let dd={};
|
||||
canshu.forEach(function(key){
|
||||
log(key);
|
||||
let k=key.split("=");
|
||||
dd[k[0]]=k[1];
|
||||
})
|
||||
var json2 = '{"type_id":"'+dd["t"]+'","vod_year":"'+dd["year"]+'","limit":"20","orderby":"","vod_area":"'+dd["area"]+'","vod_class":"'+dd["class"]+'","page":"'+dd["page"]+'","versionName":"5.6.9","uuid":"9cc01079c64e2495","version":"4835d0a2","vod_name":"","versionCode":"35","ctime":"'+getTime()+'"}';
|
||||
log(json2);
|
||||
let url="https://cym.zhui.la/api.php/video/get_list";
|
||||
let jo = posturl(url,json2);
|
||||
var d=[];
|
||||
jo.data.list.forEach(function(it){
|
||||
d.push({
|
||||
title:it.vod_name,
|
||||
img:it.vod_pic,
|
||||
desc:it.vod_remarks,
|
||||
url:it.vod_id,
|
||||
content:it.vod_blurb})
|
||||
});
|
||||
setResult(d);
|
||||
`,
|
||||
二级:`js:
|
||||
log(orId);
|
||||
var json2 = '{"vod_id":"'+orId+'","versionName":"5.6.9","uuid":"3899af59c0b12b98","version":"4835d0a2","versionCode":"35","ctime":"'+getTime()+'"}';
|
||||
log(json2);
|
||||
let url="https://cym.zhui.la/api.php/video/get_detail";
|
||||
let jo = posturl(url,json2);
|
||||
let node = jo.data;
|
||||
VOD = {
|
||||
vod_id: node["vod_id"],
|
||||
vod_name: node["vod_name"],
|
||||
vod_pic: node["vod_pic"],
|
||||
type_name: node["vod_class"],
|
||||
vod_year: node["vod_year"],
|
||||
vod_area: node["vod_area"],
|
||||
vod_remarks: node["vod_remarks"],
|
||||
vod_actor: node["vod_actor"],
|
||||
vod_director: node["vod_director"],
|
||||
vod_content: node["vod_content"]
|
||||
};
|
||||
let episodes = node.player;
|
||||
let playMap = {};
|
||||
episodes.forEach(function(ep) {
|
||||
let playurls = ep["code"];
|
||||
let source = ep["name"];
|
||||
log (playurls);
|
||||
log (source);
|
||||
//这里分别获取线路
|
||||
var json2 = '{"limit":"5000","vod_id":"'+orId+'","page":"1","versionName":"5.6.9","uuid":"9cc01079c64e2495","version":"4835d0a2","versionCode":"35","player":"'+playurls+'","ctime":"'+getTime()+'"}';
|
||||
log(json2);
|
||||
let url="https://cym.zhui.la/api.php/video/get_player";
|
||||
let jo1 = posturl(url,json2);
|
||||
jo1.data.list.forEach(function(playurl) {
|
||||
if (!playMap.hasOwnProperty(source)) {
|
||||
playMap[source] = []
|
||||
}
|
||||
playMap[source].append(playurl["drama"]+"$"+playurl["ju_id"]+"&"+playurl["plyer"]+"&"+playurl["video_id"])
|
||||
})
|
||||
});
|
||||
|
||||
let playFrom = [];
|
||||
let playList = [];
|
||||
|
||||
Object.keys(playMap)
|
||||
.forEach(function(key) {
|
||||
playFrom.append(key);
|
||||
playList.append(playMap[key].join("#"))
|
||||
});
|
||||
let vod_play_from = playFrom.join("$$$");
|
||||
let vod_play_url = playList.join("$$$");
|
||||
VOD["vod_play_from"] = vod_play_from;
|
||||
VOD["vod_play_url"] = vod_play_url
|
||||
`,
|
||||
搜索:`js:
|
||||
let page=input.split("&")[1].split("=")[1];
|
||||
log(page);
|
||||
var json2 = '{"vod_year":"","limit":"20","orderby":"up","vod_area":"","vod_class":"","page":"'+page+'","versionName":"5.6.9","uuid":"9cc01079c64e2495","version":"4835d0a2","vod_name":"'+KEY+'","versionCode":"35","ctime":"'+getTime()+'"}';
|
||||
let url="https://cym.zhui.la/api.php/video/get_list";
|
||||
let jo = posturl(url,json2);
|
||||
var d=[];
|
||||
jo.data.list.forEach(function(it){
|
||||
d.push({
|
||||
title:it.vod_name,
|
||||
img:it.vod_pic,
|
||||
desc:it.vod_remarks,
|
||||
url:it.vod_id})
|
||||
});
|
||||
setResult(d);`,
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
5bY715YyVoZ Tacit0924-总合集
|
||||
KZo6HrzGxhP BBC纪录片大合集
|
||||
jhJ4ktpANgS 300T大合集
|
||||
vgjM1MiHvoL 电影REMUX
|
||||
uWa9gbM3RJ7 优源阁-资源总合集
|
||||
HSsCwvVyWgg 此间微凉-电视剧集
|
||||
Y16fqstV5Er 全球影视首发合集
|
||||
eLxoq2u8W4d 影视分享屋合集
|
||||
bEnwAniuXzP mapotofu-总合集
|
||||
EGjCoDoJCFV 火星影剧
|
||||
2qSVjRo9SEu 电影-老王资源宝藏
|
||||
EU7WK49L4Jy YYDSVip-电影
|
||||
S1g5iJEL4kh 剧集-老王资源宝藏
|
||||
14tKp8iJ4vb 动漫-老王资源宝藏
|
||||
WdaaeX7HK44 此间微凉-动漫合集
|
||||
qjTt7fDrkT9 YYDSVip-电视剧
|
||||
UuHi9PeYSVz YYDSVip-综艺
|
||||
ancKrGAYuZ5 YYDSVip-动漫
|
||||
v9To3HC6vhs YYDSVip-综合
|
||||
KUa2Mwpm1MR 经典韩剧
|
||||
PkV89yNDPi1 日剧合集
|
||||
ftMhRaKUfYp 掌灯者-港剧
|
||||
MLWPRHRt9W3 掌灯者-台剧
|
||||
8Fg4TNsd2A2 掌灯者-大陆剧1
|
||||
ar8Kg9azw1S 掌灯者-大陆剧2
|
||||
GMYSz3AHFaA 掌灯者-大陆剧3
|
||||
q6bv8qs9u5e 掌灯者-欧美剧1
|
||||
kUDyvvcknxm 掌灯者-欧美剧2
|
||||
cmy3KCTRpFA 李连杰电影合集
|
||||
hMsDJ6dsGxQ 成龙电影合集
|
||||
@ -0,0 +1,118 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import re
|
||||
import json
|
||||
import requests
|
||||
import time
|
||||
import traceback
|
||||
import gzip
|
||||
|
||||
p=re.compile(r'.*/s/(.*)')
|
||||
skipp = re.compile(r'.*(cover|screen|频道).*',re.IGNORECASE)
|
||||
reqcount=1
|
||||
sharedict=set()
|
||||
|
||||
def getlist(w,shareid, fileid,morepage):
|
||||
global p
|
||||
global skipp
|
||||
global reqcount
|
||||
global sharedict
|
||||
|
||||
reqcount += 1
|
||||
if reqcount % 5 == 0:
|
||||
print(f"reqcount:{reqcount} shareid:{shareid} fileid:{fileid}",file=sys.stderr)
|
||||
#time.sleep(1)
|
||||
url = f'http://192.168.101.188:9978/proxy?do=pikpak&type=list&share_id={shareid}&file_id={fileid}&pass_code=&morepage={morepage}'
|
||||
print(f"url: {url}",file=sys.stderr)
|
||||
resp = requests.get(url)
|
||||
content = resp.content.decode('utf-8')
|
||||
lines = content.split("\n")
|
||||
if "folder" not in content and len(lines)<=4:
|
||||
return
|
||||
isfirst=True
|
||||
for line in lines:
|
||||
if isfirst:
|
||||
isfirst=False
|
||||
print(f"first line:{line}",file=sys.stderr)
|
||||
if skipp.match(line):
|
||||
continue
|
||||
linearr = line.split('\t')
|
||||
if len(linearr)>2:
|
||||
m = p.match(linearr[0])
|
||||
if m:
|
||||
arr = m.group(1).split("/")
|
||||
else:
|
||||
arr = linearr[0].split("/")
|
||||
shareid=arr[0]
|
||||
fileid=arr[1] if len(arr)>1 else ""
|
||||
if shareid+"/"+fileid in sharedict:
|
||||
print(f"skip shareid{shareid} fileid:{fileid}", file=sys.stderr)
|
||||
continue
|
||||
w.write(line+"\n")
|
||||
w.flush()
|
||||
if linearr[2] == "folder":
|
||||
getlist(w,shareid,fileid,False)
|
||||
|
||||
if len(lines)>0:
|
||||
getlist(w,shareid,fileid,True)
|
||||
|
||||
def main():
|
||||
try:
|
||||
f = gzip.open(sys.argv[1]+".raw.gz",mode="rt",encoding="utf-8")
|
||||
if f is not None:
|
||||
print(f"found gz raw file:{sys.argv[1]}.raw.gz, extract it",file=sys.stderr)
|
||||
with(open(sys.argv[1]+".raw","w",encoding="utf-8")) as w:
|
||||
while(True):
|
||||
lines = f.readlines()
|
||||
if len(lines)<=0:
|
||||
break
|
||||
for line in lines:
|
||||
line=line.strip()
|
||||
w.write(line+"\n")
|
||||
f.seek(0)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
try:
|
||||
f = open(sys.argv[1]+".raw","r",encoding="utf-8")
|
||||
except:
|
||||
f = None
|
||||
if f is not None:
|
||||
print("found old raw file")
|
||||
while True:
|
||||
lines = f.readlines()
|
||||
if len(lines)<=0:
|
||||
break
|
||||
for line in lines:
|
||||
linearr = line.split("\t")
|
||||
m = p.match(linearr[0])
|
||||
if m:
|
||||
arr = m.group(1).split("/")
|
||||
else:
|
||||
arr = linearr[0].split("/")
|
||||
if len(arr)>1:
|
||||
shareid = arr[0]
|
||||
fileid = arr[1]
|
||||
sharedict.add(shareid+"/"+fileid)
|
||||
f.close()
|
||||
print(f"old raw file record:{len(sharedict)}")
|
||||
else:
|
||||
print("no old raw file")
|
||||
with(open(sys.argv[1]+".raw","a+",encoding="utf-8")) as w:
|
||||
with(open(sys.argv[1],"r",encoding="utf-8")) as f:
|
||||
j = json.load(f)
|
||||
for c in j:
|
||||
shareid=c.get("type_id")
|
||||
fileid=""
|
||||
m = p.match(shareid)
|
||||
if m:
|
||||
arr = m.group(1).split("/")
|
||||
else:
|
||||
arr = shareid.split("/")
|
||||
shareid=arr[0]
|
||||
fileid=arr[1] if len(arr)>1 else ""
|
||||
if shareid+"/"+fileid in sharedict:
|
||||
continue
|
||||
getlist(w,shareid,fileid,False)
|
||||
|
||||
main()
|
||||
@ -0,0 +1,2 @@
|
||||
VNn9bR31HNQyvE5d2_hIx9L5A1?pwd=hc82 最新影视资源实时同步更新
|
||||
VNjwyIJVrUPzmOwSA07z6EP1A1?pwd=a84q 抖音收费短剧合集
|
||||
Loading…
Reference in new issue