Add files via upload

This commit is contained in:
潇洒 2024-06-25 08:53:42 +08:00 committed by GitHub
parent bb8016afdb
commit e7ab53c57a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

40
JS/drpy2.min.js vendored
View File

@ -188,13 +188,13 @@ function pre() {
try { try {
eval(code) eval(code)
} catch (e) { } catch (e) {
console.log("预处理执行失败:" + e.message) console.log(`预处理执行失败:${e.message}`)
} }
} }
} }
let rule = {}; let rule = {};
let vercode = typeof pdfl === "function" ? "drpy2.1" : "drpy2"; let vercode = typeof pdfl === "function" ? "drpy2.1" : "drpy2";
const VERSION = vercode + " 3.9.50beta29 20240613"; const VERSION = vercode + " 3.9.50beta31 20240617";
const MOBILE_UA = "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36"; const MOBILE_UA = "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36";
const PC_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36"; const PC_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36";
const UA = "Mozilla/5.0"; const UA = "Mozilla/5.0";
@ -663,9 +663,7 @@ function Utf8ArrayToStr(array) {
return out return out
} }
function gzip(str) { function gzip(str) {
let arr = pako.gzip(str, { let arr = pako.gzip(str, {});
to: "string"
});
return uint8ArrayToBase64(arr) return uint8ArrayToBase64(arr)
} }
function ungzip(b64Data) { function ungzip(b64Data) {
@ -954,7 +952,7 @@ function getQuery(url) {
}); });
return resObj return resObj
} catch (err) { } catch (err) {
log("getQuery发生错误:" + e.message); log(`getQuery发生错误:${e.message}`);
return {} return {}
} }
} }
@ -978,7 +976,7 @@ function pdfh2(html, parse) {
.toString() .toString()
} }
} catch (e) { } catch (e) {
print("html对象转文本发生了错误:" + e.message) print(`html对象转文本发生了错误:${e.message}`)
} }
let result = defaultParser.pdfh(html2, parse); let result = defaultParser.pdfh(html2, parse);
let option = parse.includes("&&") ? parse.split("&&") let option = parse.includes("&&") ? parse.split("&&")
@ -1000,7 +998,7 @@ function pdfa2(html, parse) {
.toString() .toString()
} }
} catch (e) { } catch (e) {
print("html对象转文本发生了错误:" + e.message) print(`html对象转文本发生了错误:${e.message}`)
} }
return defaultParser.pdfa(html2, parse) return defaultParser.pdfa(html2, parse)
} }
@ -1449,7 +1447,7 @@ function homeParse(homeObj) {
classes = input classes = input
} }
} catch (e) { } catch (e) {
log("通过js动态获取分类发生了错误:" + e.message) log(`通过js动态获取分类发生了错误:${e.message}`)
} }
} else { } else {
let p = homeObj.class_parse.split(";"); let p = homeObj.class_parse.split(";");
@ -1620,7 +1618,7 @@ function homeVodParse(homeVodObj) {
}; };
d.push(vod) d.push(vod)
} catch (e) { } catch (e) {
console.log("首页列表双层定位处理发生错误:" + e.message) console.log(`首页列表双层定位处理发生错误:${e.message}`)
} }
} }
} }
@ -1666,7 +1664,7 @@ function homeVodParse(homeVodObj) {
}; };
d.push(vod) d.push(vod)
} catch (e) { } catch (e) {
console.log("首页列表单层定位处理发生错误:" + e.message) console.log(`首页列表单层定位处理发生错误:${e.message}`)
} }
} }
} }
@ -1746,7 +1744,7 @@ function categoryParse(cateObj) {
} }
} }
} catch (e) { } catch (e) {
print("合并不同分类对应的默认筛选出错:" + e.message) print(`合并不同分类对应的默认筛选出错:${e.message}`)
} }
} }
let new_url; let new_url;
@ -2029,7 +2027,7 @@ function searchParse(searchObj) {
}) })
} }
} catch (e) { } catch (e) {
print("搜索发生错误:" + e.message); print(`搜索发生错误:${e.message}`);
return "{}" return "{}"
} }
} }
@ -2260,14 +2258,14 @@ function detailParse(detailObj) {
.slice(0, 2) .slice(0, 2)
.join("$")) .join("$"))
} catch (e) { } catch (e) {
print("格式化LISTS发生错误:" + e.message) print(`格式化LISTS发生错误:${e.message}`)
} }
} }
} }
vod_play_url = LISTS.map(it => it.join("#")) vod_play_url = LISTS.map(it => it.join("#"))
.join(vod_play_url) .join(vod_play_url)
} catch (e) { } catch (e) {
print("js执行lists: 发生错误:" + e.message) print(`js执行lists: 发生错误:${e.message}`)
} }
} else { } else {
let list_text = p.list_text || "body&&Text"; let list_text = p.list_text || "body&&Text";
@ -2426,7 +2424,7 @@ function playParse(playObj) {
url: input url: input
} }
} catch (e) { } catch (e) {
print("js免嗅错误:" + e.message); print(`js免嗅错误:${e.message}`);
lazy_play = common_play lazy_play = common_play
} }
} else { } else {
@ -2491,7 +2489,7 @@ function isVideoParse(isVideoObj) {
return false return false
} }
} catch (e) { } catch (e) {
log("执行嗅探规则发生错误:" + e.message); log(`执行嗅探规则发生错误:${e.message}`);
return false return false
} }
} }
@ -2619,7 +2617,7 @@ function init(ext) {
eval(rule.hostJs); eval(rule.hostJs);
rule.host = HOST.rstrip("/") rule.host = HOST.rstrip("/")
} catch (e) { } catch (e) {
console.log(`执行${rule.hostJs}获取host发生错误:` + e.message) console.log(`执行${rule.hostJs}获取host发生错误:${e.message}`)
} }
} }
if (rule["模板"] === "自动") { if (rule["模板"] === "自动") {
@ -2737,13 +2735,13 @@ function init(ext) {
console.log(v); console.log(v);
rule.headers[k] = v rule.headers[k] = v
} catch (e) { } catch (e) {
console.log(`${v}获取cookie发生错误:` + e.message) console.log(`${v}获取cookie发生错误:${e.message}`)
} }
} }
} }
} }
} catch (e) { } catch (e) {
console.log("处理headers发生错误:" + e.message) console.log(`处理headers发生错误:${e.message}`)
} }
} }
rule_fetch_params = { rule_fetch_params = {
@ -2756,7 +2754,7 @@ function init(ext) {
pre(); pre();
init_test() init_test()
} catch (e) { } catch (e) {
console.log("init_test发生错误:" + e.message) console.log(`init_test发生错误:${e.message}`)
} }
} }
let homeHtmlCache = undefined; let homeHtmlCache = undefined;