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