forked from gaotianliuyun/gao
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Anime1动畫.js
169 lines (168 loc) · 4.79 KB
/
Anime1动畫.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
// 注意事项:此源仅支持 影视TV 及 爱佬版tvbox最新版
// 注意事项:此源仅支持 影视TV 及 爱佬版tvbox最新版
// 注意事项:此源仅支持 影视TV 及 爱佬版tvbox最新版
// 3个set-Cookie
var rule = {
title:'Anime1动畫',
host:'https://anime1.me',
url: '/fyclass',
detailUrl:'/?cat=fyid',
searchUrl: '/page/fypage?s=**',
searchable:2,
quickSearch:0,
headers:{'User-Agent': 'PC_UA'},
timeout:5000,
class_name:'連載中&2023&2022&2021&2020&2019&2018&更早',
class_url:'連載中&2023&2022&2021&2020&2019&2018&2017',
play_parse:true,
lazy:`js:
var apiurl = 'https://v.anime1.me/api';
var html = request(apiurl, {
headers: {
'Referer': HOST,
},
body: 'd=' + input,
method: 'POST',
withHeaders: true
});
let json = JSON.parse(html);
print(json);
log(Object.keys(json));
let setCk = Object.keys(json).filter(it => it.toLowerCase() === "set-cookie");
let cookie = setCk ? json[setCk] : "";
// 3个set-Cookie
if (Array.isArray(cookie)) {
cookie = cookie.join(';');
}
cookie = cookie.split(';').filter(function(it) {
return ['e', 'p', 'h'].includes(it.split('=')[0])
}).join(';');
log(cookie);
var purl = JSON.parse(json.body).s[0].src;
if (purl.startsWith('/')) {
purl = 'https:' + purl
}
input = {
jx: 0,
url: purl,
parse: 0,
header: JSON.stringify({
'referer': HOST,
'Cookie': cookie,
'user-agent': PC_UA
}),
}
`,
limit:6,
推荐: `js:
var d = [];
function stripHtmlTag(src) {
return src.replace(/<\\/?[^>]+(>|$)/g, '').replace(/&.{1,5};/g, '').replace(/\\s{2,}/g, ' ');
}
var timestamp = new Date().getTime();
var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
var list = JSON.parse(json);
let playKeys = Object.values(list).filter(function(x) {
return x[2].includes('連載中');
});
playKeys.forEach(function(it) {
d.push({
title: stripHtmlTag(it[1]),
img: 'https://sta.anicdn.com/playerImg/8.jpg',
desc: it[2],
url: it[0],
});
});
setResult(d);
`,
一级: `js:
var d = [];
function stripHtmlTag(src) {
return src.replace(/<\\/?[^>]+(>|$)/g, '').replace(/&.{1,5};/g, '').replace(/\\s{2,}/g, ' ');
}
var timestamp = new Date().getTime();
var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
var list = JSON.parse(json);
let playKeys = Object.values(list).filter(function(x) {
if (MY_CATE === '連載中') return x[2].includes(MY_CATE);
else if (MY_CATE === '2017') return x[3] <= MY_CATE;
else return x[3] == MY_CATE;
});
playKeys.forEach(function(it) {
d.push({
title: stripHtmlTag(it[1]),
img: 'https://sta.anicdn.com/playerImg/8.jpg',
desc: it[2],
url: it[0],
});
});
setResult(d);
`,
二级: `js:
pdfh = jsp.pdfh; pdfa = jsp.pdfa; pd = jsp.pd;
var html = request(input);
var timestamp = new Date().getTime();
var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
var list = JSON.parse(json);
var vid = input.split('=')[1];
let playKeys = Object.values(list).find(function(x) {
return x[0] === parseInt(vid);
});
VOD = {
vod_pic: 'https://sta.anicdn.com/playerImg/8.jpg',
vod_id: playKeys[0],
vod_name: playKeys[1],
vod_content: playKeys[2],
vod_year: playKeys[3],
type_name: playKeys[4],
vod_actor: playKeys[5],
};
var pageurl = pd(html, '.cat-links&&a&&href');
var pagenum = 1;
let vod_tab_list = [];
let vlist = [];
for (let p = 1; p < parseInt(pagenum) + 1; p++) {
let phtml = request(pageurl + '/page/' + pagenum);
let new_vod_list = [];
let vodList = [];
vodList = pdfa(phtml, '.site-main&&article');
for (let i = 0; i < vodList.length; i++) {
let it = vodList[i];
let ptitle = pdfh(it, '.entry-title&&Text').replace(/\\[(.*)\\]/, '$1');
let purl = pd(it, '.video-js&&data-apireq');
new_vod_list.push(ptitle + '$' + purl);
}
vlist = vlist.concat(new_vod_list);
try {
pagenum = pd(phtml, '.nav-previous&&a&&href').split('/page/')[1];
} catch(e) {}
}
let vlist2 = vlist.reverse().join("#");
vod_tab_list.push(vlist2);
VOD.vod_play_from = '道长在线';
VOD.vod_play_url = vod_tab_list.join("$$$");
`,
搜索: `js:
var d = [];
function stripHtmlTag(src) {
return src.replace(/<\\/?[^>]+(>|$)/g, '').replace(/&.{1,5};/g, '').replace(/\\s{2,}/g, ' ');
}
var timestamp = new Date().getTime();
var json = request('https://d1zquzjgwo9yb.cloudfront.net/?_=' + timestamp);
var list = JSON.parse(json);
var wd = input.split('=')[1];
let playKeys = Object.values(list).filter(function(x) {
return x[1].includes(wd);
});
log(playKeys);
playKeys.forEach(function(it) {
d.push({
title: stripHtmlTag(it[1]),
img: 'https://sta.anicdn.com/playerImg/8.jpg',
desc: it[2],
url: it[0],
});
});
setResult(d);
`,
}