forked from gaotianliuyun/gao
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ddys_d.js
136 lines (133 loc) · 6.15 KB
/
ddys_d.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
var lists = `js:
log(TABS);
let d = [];
pdfh = jsp.pdfh;
pdfa = jsp.pdfa;
if (typeof play_url === "undefined") {
var play_url = ""
}
function getLists(html) {
let src = pdfh(html, ".wp-playlist-script&&Html");
src = JSON.parse(src).tracks;
let list1 = [];
let list2 = [];
let url1 = "";
let url2 = "";
src.forEach(function(it) {
let src0 = it.src0;
let src1 = it.src1;
let title = it.caption;
url1 = "https://v.ddys.pro" + src0;
url2 = "https://ddys.pro/getvddr2/video?id=" + src1 + "&type=mix";
let zm = "https://ddys.pro/subddr/" + it.subsrc;
list1.push({
title: title,
url: url1,
desc: zm
});
list2.push({
title: title,
url: url2,
desc: zm
})
});
return {
list1: list1,
list2: list2
}
}
var data = getLists(html);
var list1 = data.list1;
var list2 = data.list2;
let nums = pdfa(html, "body&&.post-page-numbers");
nums.forEach(function(it) {
let num = pdfh(it, "body&&Text");
log(num);
let nurl = input + num + "/";
if (num == 1) {
return
}
log(nurl);
let html = request(nurl);
let data = getLists(html);
list1 = list1.concat(data.list1);
list2 = list2.concat(data.list2)
});
list1 = list1.map(function(item) {
return item.title + "$" + play_url + urlencode(item.url + "|" + input + "|" + item.desc)
});
list2 = list2.map(function(item) {
return item.title + "$" + play_url + urlencode(item.url + "|" + input + "|" + item.desc)
});
LISTS = [list1, list2];
`;
var lazy = `js:
let purl = input.split("|")[0];
let referer = input.split("|")[1];
let zm = input.split("|")[2];
print("purl:" + purl);
print("referer:" + referer);
print("zm:" + zm);
if (/getvddr/.test(purl)) {
let html = request(purl, {
headers: {
Referer: HOST,
"User-Agent": MOBILE_UA
}
});
print(html);
try {
input = {jx:0,url:JSON.parse(html).url,parse:0} || {}
} catch (e) {
input = purl
}
} else {
input = {
jx: 0,
url: purl,
parse: 0,
header: JSON.stringify({
'user-agent': MOBILE_UA,
'referer': HOST
})
}
}
`;
// 网址发布页 https://ddys.site
// 网址发布页 https://ddys.wiki
var rule={
title:'ddys',
// host:'https://ddys.wiki',
// hostJs:'print(HOST);let html=request(HOST,{headers:{"User-Agent":MOBILE_UA}});HOST = jsp.pdfh(html,"a:eq(1)&&href")',
host:'https://ddys.pro',
// host:'https://ddys.mov',
url:'/fyclass/page/fypage/',
searchUrl:'/?s=**&post_type=post',
searchable:2,
quickSearch:0,
filterable:0,
headers:{
'User-Agent':'MOBILE_UA',
},
class_parse:'#primary-menu li.menu-item;a&&Text;a&&href;\.pro/(.*)',
cate_exclude:'站长|^其他$|关于|^电影$|^剧集$|^类型$',
play_parse:true,
// lazy:'js:let purl=input.split("|")[0];let referer=input.split("|")[1];let zm=input.split("|")[2];print("purl:"+purl);print("referer:"+referer);print("zm:"+zm);let myua="okhttp/3.15";if(/ddrkey/.test(purl)){let ret=request(purl,{Referer:referer,withHeaders:true,"User-Agent":myua});log(ret);input=purl}else{let html=request(purl,{headers:{Referer:referer,"User-Agent":myua}});print(html);try{input=JSON.parse(html).url||{}}catch(e){input=purl}}',
lazy:lazy,
limit:6,
推荐:'*',
double:true, // 推荐内容是否双层定位
一级:'.post-box-list&&article;a:eq(-1)&&Text;.post-box-image&&style;a:eq(0)&&Text;a:eq(-1)&&href',
二级:{
"title":".post-title&&Text;.cat-links&&Text",
"img":".doulist-item&&img&&data-cfsrc",
"desc":".published&&Text",
"content":".abstract&&Text",
// "tabs":"js:TABS=['国内','海外(貌似不能播放)']",
"tabs":"js:TABS=['国内(改Exo播放器)','国内2']",
// "lists":"js:log(TABS);let d=[];pdfh=jsp.pdfh;pdfa=jsp.pdfa;if(typeof play_url===\"undefined\"){var play_url=\"\"}function getLists(html){let src=pdfh(html,\".wp-playlist-script&&Html\");src=JSON.parse(src).tracks;let list1=[];let list2=[];src.forEach(function(it){let src0=it.src0;let src1=it.src1;let src2=it.src2;let title=it.caption;let url1=\"https://ddys.tv/getvddr/video?id=\"+src1+\"&dim=1080P+&type=mix\";let url2=\"https://w.ddys.tv\"+src0+\"?ddrkey=\"+src2;let zm=\"https://ddys.tv/subddr/\"+it.subsrc;list1.push({title:title,url:url1,desc:zm});list2.push({title:title,url:url2,desc:zm})});return{list1:list1,list2:list2}}var data=getLists(html);var list1=data.list1;var list2=data.list2;let nums=pdfa(html,\"body&&.post-page-numbers\");nums.forEach(function(it){let num=pdfh(it,\"body&&Text\");log(num);let nurl=input+num+\"/\";if(num==1){return}log(nurl);let html=request(nurl);let data=getLists(html);list1=list1.concat(data.list1);list2=list2.concat(data.list2)});list1=list1.map(function(item){return item.title+\"$\"+play_url+urlencode(item.url+\"|\"+input+\"|\"+item.desc)});list2=list2.map(function(item){return item.title+\"$\"+play_url+urlencode(item.url+\"|\"+input+\"|\"+item.desc)});LISTS=[list1,list2];",
// lists:'js:log(TABS);let d=[];pdfh=jsp.pdfh;pdfa=jsp.pdfa;if(typeof play_url==="undefined"){var play_url=""}function getLists(html){let src=pdfh(html,".wp-playlist-script&&Html");src=JSON.parse(src).tracks;let list1=[];let list2=[];src.forEach(function(it){let src0=it.src0;let src1=it.src1;let src2=it.src2;let title=it.caption;let url1="https://ddys.pro/getvddr/video?id="+src1+"&dim=1080P+&type=mix";let url2="https://w.ddys.pro"+src0+"?ddrkey="+src2;let zm="https://ddys.pro/subddr/"+it.subsrc;list1.push({title:title,url:url1,desc:zm});list2.push({title:title,url:url2,desc:zm})});return{list1:list1,list2:list2}}var data=getLists(html);var list1=data.list1;var list2=data.list2;let nums=pdfa(html,"body&&.post-page-numbers");nums.forEach(function(it){let num=pdfh(it,"body&&Text");log(num);let nurl=input+num+"/";if(num==1){return}log(nurl);let html=request(nurl);let data=getLists(html);list1=list1.concat(data.list1);list2=list2.concat(data.list2)});list1=list1.map(function(item){return item.title+"$"+play_url+urlencode(item.url+"|"+input+"|"+item.desc)});list2=list2.map(function(item){return item.title+"$"+play_url+urlencode(item.url+"|"+input+"|"+item.desc)});LISTS=[list1,list2];',
"lists":lists
},
搜索:'#main&&article;.post-title&&Text;;.published&&Text;a&&href'
}