Skip to content

Commit a0e3f88

Browse files
committed
fix:vercel
1 parent d44fba5 commit a0e3f88

File tree

3 files changed

+123
-17
lines changed

3 files changed

+123
-17
lines changed

custom.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"sites_count": 19,
2+
"sites_count": 24,
33
"sites": [
44
{
55
"key": "drpyS_ikanbot",
@@ -31,6 +31,16 @@
3131
"quickSearch": 0,
3232
"ext": ""
3333
},
34+
{
35+
"key": "drpyS_xvideos[密]",
36+
"name": "xvideos[密](DS)",
37+
"type": 4,
38+
"api": "http://localhost:5757/api/xvideos[密]",
39+
"searchable": 1,
40+
"filterable": 1,
41+
"quickSearch": 0,
42+
"ext": ""
43+
},
3444
{
3545
"key": "drpyS_人人视频",
3646
"name": "人人视频(DS)",
@@ -151,6 +161,36 @@
151161
"quickSearch": 0,
152162
"ext": ""
153163
},
164+
{
165+
"key": "drpyS_色花堂[密+]",
166+
"name": "色花堂[密+](DS)",
167+
"type": 4,
168+
"api": "http://localhost:5757/api/色花堂[密+]",
169+
"searchable": 2,
170+
"filterable": 1,
171+
"quickSearch": 0,
172+
"ext": ""
173+
},
174+
{
175+
"key": "drpyS_色花堂[密]",
176+
"name": "色花堂[密](DS)",
177+
"type": 4,
178+
"api": "http://localhost:5757/api/色花堂[密]",
179+
"searchable": 2,
180+
"filterable": 1,
181+
"quickSearch": 0,
182+
"ext": ""
183+
},
184+
{
185+
"key": "drpyS_草榴社区[密]",
186+
"name": "草榴社区[密](DS)",
187+
"type": 4,
188+
"api": "http://localhost:5757/api/草榴社区[密]",
189+
"searchable": 2,
190+
"filterable": 1,
191+
"quickSearch": 0,
192+
"ext": ""
193+
},
154194
{
155195
"key": "drpyS_荐片",
156196
"name": "荐片(DS)",
@@ -190,6 +230,16 @@
190230
"filterable": 1,
191231
"quickSearch": 0,
192232
"ext": ""
233+
},
234+
{
235+
"key": "drpyS_黑料不打烊[密]",
236+
"name": "黑料不打烊[密](DS)",
237+
"type": 4,
238+
"api": "http://localhost:5757/api/黑料不打烊[密]",
239+
"searchable": 1,
240+
"filterable": 0,
241+
"quickSearch": 0,
242+
"ext": ""
193243
}
194244
],
195245
"parses": [

index.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"sites_count": 19,
2+
"sites_count": 24,
33
"sites": [
44
{
55
"key": "drpyS_ikanbot",
@@ -31,6 +31,16 @@
3131
"quickSearch": 0,
3232
"ext": ""
3333
},
34+
{
35+
"key": "drpyS_xvideos[密]",
36+
"name": "xvideos[密](DS)",
37+
"type": 4,
38+
"api": "http://localhost:5757/api/xvideos[密]",
39+
"searchable": 1,
40+
"filterable": 1,
41+
"quickSearch": 0,
42+
"ext": ""
43+
},
3444
{
3545
"key": "drpyS_人人视频",
3646
"name": "人人视频(DS)",
@@ -151,6 +161,36 @@
151161
"quickSearch": 0,
152162
"ext": ""
153163
},
164+
{
165+
"key": "drpyS_色花堂[密+]",
166+
"name": "色花堂[密+](DS)",
167+
"type": 4,
168+
"api": "http://localhost:5757/api/色花堂[密+]",
169+
"searchable": 2,
170+
"filterable": 1,
171+
"quickSearch": 0,
172+
"ext": ""
173+
},
174+
{
175+
"key": "drpyS_色花堂[密]",
176+
"name": "色花堂[密](DS)",
177+
"type": 4,
178+
"api": "http://localhost:5757/api/色花堂[密]",
179+
"searchable": 2,
180+
"filterable": 1,
181+
"quickSearch": 0,
182+
"ext": ""
183+
},
184+
{
185+
"key": "drpyS_草榴社区[密]",
186+
"name": "草榴社区[密](DS)",
187+
"type": 4,
188+
"api": "http://localhost:5757/api/草榴社区[密]",
189+
"searchable": 2,
190+
"filterable": 1,
191+
"quickSearch": 0,
192+
"ext": ""
193+
},
154194
{
155195
"key": "drpyS_荐片",
156196
"name": "荐片(DS)",
@@ -190,6 +230,16 @@
190230
"filterable": 1,
191231
"quickSearch": 0,
192232
"ext": ""
233+
},
234+
{
235+
"key": "drpyS_黑料不打烊[密]",
236+
"name": "黑料不打烊[密](DS)",
237+
"type": 4,
238+
"api": "http://localhost:5757/api/黑料不打烊[密]",
239+
"searchable": 1,
240+
"filterable": 0,
241+
"quickSearch": 0,
242+
"ext": ""
193243
}
194244
],
195245
"parses": [

js/番薯动漫.js

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// http://localhost:5757/api/番薯动漫?ac=detail&ids=/voddetail/USJJJJJk.html
33
// http://localhost:5757/api/番薯动漫?wd=我的&pg=1
44
// http://localhost:5757/api/番薯动漫?play=/vodplay/USJJJJJk-2-1.html&flag=由qq倾情打造
5-
const { getHtml } = $.require('./_lib.request.js')
5+
const {getHtml} = $.require('./_lib.request.js')
66

77
var rule = {
88
类型: '影视',
@@ -50,7 +50,7 @@ var rule = {
5050
return []
5151
},
5252
一级: async function (tid, pg, filter, extend) {
53-
let { MY_CATE, input } = this;
53+
let {MY_CATE, input} = this;
5454
if (pg <= 0) pg = 1;
5555
const html = (await _req(`${rule.host}/vodshow/${tid}--------${pg}---.html`)).content;
5656
const $ = pq(html);
@@ -70,7 +70,7 @@ var rule = {
7070
return videos
7171
},
7272
二级: async function (ids) {
73-
let { input } = this;
73+
let {input} = this;
7474
const html = (await _req(rule.host + ids[0])).content
7575
const $ = pq(html);
7676
let vod = {
@@ -79,6 +79,7 @@ var rule = {
7979
vod_remarks: $(".module-info-item-title:contains(更新)+p").text(),
8080
vod_content: $(".show-desc").text().trim()
8181
};
82+
log(`加载二级:${input}`);
8283
vod.vod_play_from = $("#y-playList span").map((_, i) => $(i).text()).get().join('$$$');
8384
vod.vod_play_url = $(".module-play-list-content").map((_, item) => {
8485
return $(item).find("a").map((_, i) => {
@@ -88,7 +89,7 @@ var rule = {
8889
return vod
8990
},
9091
搜索: async function (wd, quick, pg) {
91-
let { input } = this;
92+
let {input} = this;
9293
let ck = await verifyCode(
9394
rule.host + "/index.php/verify/index.html?",
9495
{
@@ -128,7 +129,7 @@ var rule = {
128129
return videos
129130
},
130131
lazy: async function (flag, id, flags) {
131-
let { input } = this;
132+
let {input} = this;
132133
const html = (await _req(rule.host + id)).content;
133134
eval(html.match(/player_aaaa[\s\S]*?(?=<\/script>)/)[0])
134135
let purl = "https://api.bytegooty.com//?url=" + player_aaaa.url
@@ -138,10 +139,11 @@ var rule = {
138139
let play_url;
139140
try {
140141
const sortByKey = (_0x2df378, _0x5d56c7, _0x3a5216) => _0x5d56c7.sort(({
141-
[_0x2df378]: _0x258bb0
142-
}, {
143-
[_0x2df378]: _0x58eebd
144-
}) => _0x3a5216(_0x258bb0, _0x58eebd))
142+
[_0x2df378]: _0x258bb0
143+
}, {
144+
[_0x2df378]: _0x58eebd
145+
}) => _0x3a5216(_0x258bb0, _0x58eebd))
146+
145147
function decrypt(_0x29c3c3) {
146148
let _0x9d66e = $("meta[name=\"viewport\"]").attr("id").replace("now_", ""),
147149
_0x165aac = $("meta[charset=\"UTF-8\"]").attr("id").replace("now_", ""),
@@ -168,16 +170,18 @@ var rule = {
168170
});
169171
return _0x477cb9.toString(CryptoJS.enc.Utf8);
170172
}
173+
171174
play_url = decrypt(config.url)
172175
} catch (error) {
173176
console.log(error)
174177
}
175-
return { parse: 0, url: play_url }
178+
return {parse: 0, url: play_url}
176179
},
177180
};
178181

179182
const expire = 60 * 5 * 1000; // 设置cookie过期时间,单位毫秒
180183
let timeA = new Date().getTime();
184+
181185
async function _req(url, opt) {
182186
let timeB = new Date().getTime();
183187
if (!rule.headers.cookie || timeB - timeA > expire) {
@@ -213,16 +217,16 @@ async function getJwt() {
213217
height: 864
214218
};
215219

216-
const wasmBuffer = await axios.get("https://challenge.rivers.chaitin.cn/challenge/v2/calc.wasm", { responseType: 'arraybuffer' });
217-
const rootResp = await axios.get("https://www.fsdm02.com/", { headers: { "User-Agent": UA } }).catch(error => error.response);
220+
const wasmBuffer = await axios.get("https://challenge.rivers.chaitin.cn/challenge/v2/calc.wasm", {responseType: 'arraybuffer'});
221+
const rootResp = await axios.get("https://www.fsdm02.com/", {headers: {"User-Agent": UA}}).catch(error => error.response);
218222
const cookie = rootResp?.headers?.['set-cookie']?.map(it => it.replace(/;.*/, "")).join(";");
219223
const html = rootResp.data;
220224
const clientId = html.match(/SafeLineChallenge\("(.*?)"/)[1];
221225
const level = parseInt(html.match(/SafeLineChallenge.*?level:\s*"(\d+)"/)[1], 10);
222226
const issueJson = (await axios.post("https://challenge.rivers.chaitin.cn/challenge/v2/api/issue", {
223227
client_id: clientId,
224228
level
225-
}, { headers: { "Content-Type": "application/json" } })).data;
229+
}, {headers: {"Content-Type": "application/json"}})).data;
226230

227231
function u(e, t) {
228232
return ({
@@ -232,7 +236,7 @@ async function getJwt() {
232236
})
233237
}
234238

235-
WebAssembly.instantiate(wasmBuffer.data).then(({ instance }) => {
239+
WebAssembly.instantiate(wasmBuffer.data).then(({instance}) => {
236240
let n = {};
237241
n.data = (u(function (e) {
238242
return instance.exports.reset(),
@@ -243,6 +247,7 @@ async function getJwt() {
243247
return instance.exports.ret()
244248
})
245249
}, issueJson.data))
250+
246251
function generateRandomString(length) {
247252
const characters = '0123456789abcdefghijklmnopqrstuvwxyz';
248253
let result = '';
@@ -255,6 +260,7 @@ async function getJwt() {
255260

256261
return result;
257262
}
263+
258264
const visitorId = generateRandomString(32);
259265
axios.post("https://challenge.rivers.chaitin.cn/challenge/v2/api/verify", {
260266
issue_id: n.data.issue_id,
@@ -323,7 +329,7 @@ async function verifyCode(imgUrl, verifyUrlOpt, num = 1) {
323329
setCookie = [setCookie];
324330
}
325331
cookie = setCookie.map(it => it.replace(/;.*/, '')).join(";");
326-
let { url: vurl, ...vopt } = JSON.parse(JSON.stringify(verifyUrlOpt)
332+
let {url: vurl, ...vopt} = JSON.parse(JSON.stringify(verifyUrlOpt)
327333
.replace(/\$cookie/g, cookie)
328334
.replace(/\$code/g, validate)
329335
)

0 commit comments

Comments
 (0)