From 943c52f759b65df7bfd6b9628722c36772c8e0c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87=E6=B4=92?= <78096245+PizazzGY@users.noreply.github.com> Date: Sat, 29 Jun 2024 23:12:13 +0800 Subject: [PATCH] Add files via upload --- JS/58动漫.js | 37 +++-- JS/drpy2.min.js | 380 +++++++++++++++++------------------------------- JS/大米动漫.js | 8 + JS/异世界.js | 2 +- JS/樱花动漫.js | 2 +- JS/次元城.js | 2 +- JS/花子动漫.js | 142 +++++++++--------- JS/路漫漫.js | 83 +++++------ JS/驴番动漫.js | 2 +- 9 files changed, 268 insertions(+), 390 deletions(-) create mode 100644 JS/大米动漫.js diff --git a/JS/58动漫.js b/JS/58动漫.js index 8a5555a..a0b842d 100644 --- a/JS/58动漫.js +++ b/JS/58动漫.js @@ -3,26 +3,23 @@ muban.vfed.二级.desc = '.fed-col-md3:eq(3)&&Text;;;.fed-col-md6--span:eq(0)&&T muban.vfed.二级.tabs = '.nav-tabs&&li'; muban.vfed.二级.lists = '.myui-content__list:eq(#id)&&li'; var rule = { - title:'58动漫', // 原"幻听网听书"网站 已更名为 "58动漫" - 模板:'vfed', - host:'http://www.ting38.com', - // url:'/ting/fyclass-fypage.html', - url:'/search.php?page=fypage&searchtype=5&tid=fyclassfyfilter', - filterable:1,//是否启用分类筛选, - filter_url:'&order={{fl.by}}&area={{fl.area}}&year={{fl.year}}', - filter:{ - "1":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"more","v":"more"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hit"},{"n":"推荐","v":"commend"}]}], - "2":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"more","v":"more"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hit"},{"n":"推荐","v":"commend"}]}], - "3":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"more","v":"more"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hit"},{"n":"推荐","v":"commend"}]}], - "4":[{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"},{"n":"欧美","v":"欧美"},{"n":"泰国","v":"泰国"},{"n":"其他","v":"其他"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"2024"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"more","v":"more"}]},{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hit"},{"n":"推荐","v":"commend"}]}] + title: '58动漫[漫]', + 模板: 'vfed', + host: 'http://www.ting38.com', + url: '/search.php?page=fypage&searchtype=5&tid=fyclassfyfilter', + class_parse: '.fed-pops-navbar&&li;a&&Text;a&&href;.*/(.*?).html', + play_parse: true, + lazy: "js:var html=JSON.parse(request(input).match(/r player_.*?=(.*?)(\s+)?\{/, "js:") - .replace(/\}$/, "") + return strfun.replace(/^\(\)(\s+)?=>(\s+)?\{/, "js:").replace(/\}$/, "") } }; @@ -305,12 +299,12 @@ function window_b64() { btoa: btoa } } -if (typeof atob != "function" || typeof btoa != "function") { +if (typeof atob !== "function" || typeof btoa !== "function") { var { atob, btoa } = window_b64() } -if (typeof Object.assign != "function") { +if (typeof Object.assign !== "function") { Object.assign = function() { let target = arguments[0]; for (let i = 1; i < arguments.length; i++) { @@ -360,12 +354,12 @@ if (!Array.prototype.includes) { enumerable: false }) } -if (typeof String.prototype.startsWith != "function") { +if (typeof String.prototype.startsWith !== "function") { String.prototype.startsWith = function(prefix) { return this.slice(0, prefix.length) === prefix } } -if (typeof String.prototype.endsWith != "function") { +if (typeof String.prototype.endsWith !== "function") { String.prototype.endsWith = function(suffix) { return this.indexOf(suffix, this.length - suffix.length) !== -1 } @@ -385,7 +379,7 @@ Object.defineProperty(Object.prototype, "myValues", { }, enumerable: false }); -if (typeof Object.prototype.values != "function") { +if (typeof Object.prototype.values !== "function") { Object.defineProperty(Object.prototype, "values", { value: function(obj) { if (obj == null) { @@ -402,7 +396,7 @@ if (typeof Object.prototype.values != "function") { enumerable: false }) } -if (typeof Array.prototype.join != "function") { +if (typeof Array.prototype.join !== "function") { Object.defineProperty(Array.prototype, "join", { value: function(emoji) { emoji = emoji || ""; @@ -428,7 +422,7 @@ if (typeof Array.prototype.join != "function") { enumerable: false }) } -if (typeof Array.prototype.toReversed != "function") { +if (typeof Array.prototype.toReversed !== "function") { Object.defineProperty(Array.prototype, "toReversed", { value: function() { const clonedList = this.slice(); @@ -527,8 +521,7 @@ function rc(js) { iv: t, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 - }) - .toString(CryptoJS.enc.Utf8) + }).toString(CryptoJS.enc.Utf8) }, En: function(word) { var Encrypted = CryptoJS.AES.encrypt(word, a, { @@ -550,8 +543,7 @@ function maoss(jxurl, ref, key) { return CryptoJS.AES.decrypt(text, key, { iv: iv, padding: CryptoJS.pad.Pkcs7 - }) - .toString(CryptoJS.enc.Utf8) + }).toString(CryptoJS.enc.Utf8) }; var token_key = key == undefined ? "dvyYRQlnPRCMdQSe" : key; if (ref) { @@ -578,8 +570,7 @@ function maoss(jxurl, ref, key) { config.url = CryptoJS.AES.decrypt(config.url, key, { iv: iv, padding: CryptoJS.pad.Pkcs7 - }) - .toString(CryptoJS.enc.Utf8) + }).toString(CryptoJS.enc.Utf8) } return config.url } catch (e) { @@ -587,32 +578,15 @@ function maoss(jxurl, ref, key) { } } function urlencode(str) { - str = (str + "") - .toString(); - return encodeURIComponent(str) - .replace(/!/g, "%21") - .replace(/'/g, "%27") - .replace(/\(/g, "%28") - .replace(/\)/g, "%29") - .replace(/\*/g, "%2A") - .replace(/%20/g, "+") + str = (str + "").toString(); + return encodeURIComponent(str).replace(/!/g, "%21").replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/\*/g, "%2A").replace(/%20/g, "+") } function encodeUrl(str) { if (typeof encodeURI == "function") { return encodeURI(str) } else { - str = (str + "") - .toString(); - return encodeURIComponent(str) - .replace(/%2F/g, "/") - .replace(/%3F/g, "?") - .replace(/%3A/g, ":") - .replace(/%40/g, "@") - .replace(/%3D/g, "=") - .replace(/%3A/g, ":") - .replace(/%2C/g, ",") - .replace(/%2B/g, "+") - .replace(/%24/g, "$") + str = (str + "").toString(); + return encodeURIComponent(str).replace(/%2F/g, "/").replace(/%3F/g, "?").replace(/%3A/g, ":").replace(/%40/g, "@").replace(/%3D/g, "=").replace(/%3A/g, ":").replace(/%2C/g, ",").replace(/%2B/g, "+").replace(/%24/g, "$") } } function base64Encode(text) { @@ -622,8 +596,7 @@ function base64Decode(text) { return CryptoJS.enc.Utf8.stringify(CryptoJS.enc.Base64.parse(text)) } function md5(text) { - return CryptoJS.MD5(text) - .toString() + return CryptoJS.MD5(text).toString() } function uint8ArrayToBase64(uint8Array) { let binaryString = String.fromCharCode.apply(null, Array.from(uint8Array)); @@ -668,8 +641,7 @@ function gzip(str) { } function ungzip(b64Data) { let strData = atob(b64Data); - const charData = strData.split("") - .map(function(x) { + const charData = strData.split("").map(function(x) { return x.charCodeAt(0) }); const binData = new Uint8Array(charData); @@ -769,12 +741,9 @@ function fixAdM3u8(m3u8_text, m3u8_url, ad_remove) { } else if (ad_remove.startsWith("js:")) { ad_remove = ad_remove.slice(3) } - let m3u8_start = m3u8_text.slice(0, m3u8_text.indexOf("#EXTINF")) - .trim(); - let m3u8_body = m3u8_text.slice(m3u8_text.indexOf("#EXTINF"), m3u8_text.indexOf("#EXT-X-ENDLIST")) - .trim(); - let m3u8_end = m3u8_text.slice(m3u8_text.indexOf("#EXT-X-ENDLIST")) - .trim(); + let m3u8_start = m3u8_text.slice(0, m3u8_text.indexOf("#EXTINF")).trim(); + let m3u8_body = m3u8_text.slice(m3u8_text.indexOf("#EXTINF"), m3u8_text.indexOf("#EXT-X-ENDLIST")).trim(); + let m3u8_end = m3u8_text.slice(m3u8_text.indexOf("#EXT-X-ENDLIST")).trim(); let murls = []; let m3_body_list = m3u8_body.split("\n"); let m3_len = m3_body_list.length; @@ -795,8 +764,7 @@ function fixAdM3u8(m3u8_text, m3u8_url, ad_remove) { } let new_m3u8_body = []; for (let murl of murls) { - if (ad_remove && new RegExp(ad_remove) - .test(murl)) {} else { + if (ad_remove && new RegExp(ad_remove).test(murl)) {} else { let murl_list = murl.split("&"); if (!murl_list[murl_list.length - 1].startsWith("http") && m3u8_url.startsWith("http")) { murl_list[murl_list.length - 1] = urljoin(m3u8_url, murl_list[murl_list.length - 1]) @@ -806,15 +774,12 @@ function fixAdM3u8(m3u8_text, m3u8_url, ad_remove) { }) } } - new_m3u8_body = new_m3u8_body.join("\n") - .trim(); - m3u8_text = [m3u8_start, new_m3u8_body, m3u8_end].join("\n") - .trim(); + new_m3u8_body = new_m3u8_body.join("\n").trim(); + m3u8_text = [m3u8_start, new_m3u8_body, m3u8_end].join("\n").trim(); return m3u8_text } function fixAdM3u8Ai(m3u8_url, headers) { - let ts = (new Date) - .getTime(); + let ts = (new Date).getTime(); let option = headers ? { headers: headers } : {}; @@ -830,41 +795,50 @@ function fixAdM3u8Ai(m3u8_url, headers) { return i } function reverseString(str) { - return str.split("") - .reverse() - .join("") + return str.split("").reverse().join("") } let m3u8 = request(m3u8_url, option); - m3u8 = m3u8.trim() - .split("\n") - .map(it => it.startsWith("#") ? it : urljoin(m3u8_url, it)) - .join("\n"); + m3u8 = m3u8.trim().split("\n").map(it => it.startsWith("#") ? it : urljoin(m3u8_url, it)).join("\n"); m3u8 = m3u8.replace(/\n\n/gi, "\n"); - let last_url = m3u8.split("\n") - .slice(-1)[0]; + let last_url = m3u8.split("\n").slice(-1)[0]; if (last_url.length < 5) { - last_url = m3u8.split("\n") - .slice(-2)[0] + last_url = m3u8.split("\n").slice(-2)[0] } if (last_url.includes(".m3u8") && last_url !== m3u8_url) { m3u8_url = urljoin2(m3u8_url, last_url); log("嵌套的m3u8_url:" + m3u8_url); m3u8 = request(m3u8_url, option) } - let s = m3u8.trim() - .split("\n") - .filter(it => it.trim()) - .join("\n"); + let s = m3u8.trim().split("\n").filter(it => it.trim()).join("\n"); let ss = s.split("\n"); - let firststr = ss.find(x => !x.startsWith("#")); + let firststr = ""; let maxl = 0; + let kk = 0; + let kkk = 2; + let secondstr = ""; + for (let i = 0; i < ss.length; i++) { + let s = ss[i]; + if (!s.startsWith("#")) { + if (kk == 0) firststr = s; + if (kk == 1) maxl = b(firststr, s); + if (kk > 1) { + if (maxl > b(firststr, s)) { + if (secondstr.length < 5) secondstr = s; + kkk = kkk + 2 + } else { + maxl = b(firststr, s); + kkk++ + } + } + kk++; + if (kk >= 20) break + } + } + if (kkk > 30) firststr = secondstr; let firststrlen = firststr.length; - let ml = Math.round(ss.length / 2) - .toString() - .length; + let ml = Math.round(ss.length / 2).toString().length; let maxc = 0; - let laststr = ss.toReversed() - .find(x => { + let laststr = ss.toReversed().find(x => { if (!x.startsWith("#")) { let k = b(reverseString(firststr), reverseString(x)); maxl = b(firststr, x); @@ -895,9 +869,7 @@ function fixAdM3u8Ai(m3u8_url, headers) { log("----广告地址----"); log(ad_urls); m3u8 = ss.join("\n"); - log("处理耗时:" + ((new Date) - .getTime() - ts) - .toString()); + log("处理耗时:" + ((new Date).getTime() - ts).toString()); return m3u8 } function forceOrder(lists, key, option) { @@ -946,8 +918,7 @@ function getQuery(url) { arr.forEach(item => { let arr1 = item.split("="); let key = arr1[0]; - let value = arr1.slice(1) - .join("="); + let value = arr1.slice(1).join("="); resObj[key] = value }); return resObj @@ -972,16 +943,13 @@ function pdfh2(html, parse) { let html2 = html; try { if (typeof html !== "string") { - html2 = html.rr(html.ele) - .toString() + html2 = html.rr(html.ele).toString() } } catch (e) { print(`html对象转文本发生了错误:${e.message}`) } let result = defaultParser.pdfh(html2, parse); - let option = parse.includes("&&") ? parse.split("&&") - .slice(-1)[0] : parse.split(" ") - .slice(-1)[0]; + let option = parse.includes("&&") ? parse.split("&&").slice(-1)[0] : parse.split(" ").slice(-1)[0]; if (/style/.test(option.toLowerCase()) && /url\(/.test(result)) { try { result = result.match(/url\((.*?)\)/)[1]; @@ -994,8 +962,7 @@ function pdfa2(html, parse) { let html2 = html; try { if (typeof html !== "string") { - html2 = html.rr(html.ele) - .toString() + html2 = html.rr(html.ele).toString() } } catch (e) { print(`html对象转文本发生了错误:${e.message}`) @@ -1181,8 +1148,7 @@ function verifyCode(url) { }, true); let json = JSON.parse(hhtml); if (!cookie) { - let setCk = Object.keys(json) - .find(it => it.toLowerCase() === "set-cookie"); + let setCk = Object.keys(json).find(it => it.toLowerCase() === "set-cookie"); cookie = setCk ? json[setCk].split(";")[0] : "" } console.log("cookie:" + cookie); @@ -1256,8 +1222,7 @@ function $require(url) { eval(request(url)) } function keysToLowerCase(obj) { - return Object.keys(obj) - .reduce((result, key) => { + return Object.keys(obj).reduce((result, key) => { const newKey = key.toLowerCase(); result[newKey] = obj[key]; return result @@ -1284,8 +1249,7 @@ function request(url, obj, ocr_flag) { obj = fetch_params } else { let headers = obj.headers || {}; - let keys = Object.keys(headers) - .map(it => it.toLowerCase()); + let keys = Object.keys(headers).map(it => it.toLowerCase()); if (!keys.includes("user-agent")) { headers["User-Agent"] = MOBILE_UA; if (typeof fetch_params === "object" && fetch_params && fetch_params.headers) { @@ -1346,8 +1310,7 @@ function reqCookie(url, obj, all_cookie) { all_cookie = all_cookie || false; let html = request(url, obj); let json = JSON.parse(html); - let setCk = Object.keys(json) - .find(it => it.toLowerCase() === "set-cookie"); + let setCk = Object.keys(json).find(it => it.toLowerCase() === "set-cookie"); let cookie = setCk ? json[setCk] : ""; if (Array.isArray(cookie)) { cookie = cookie.join(";") @@ -1364,8 +1327,7 @@ function reqCookie(url, obj, all_cookie) { fetch = request; print = function(data) { data = data || ""; - if (typeof data == "object" && Object.keys(data) - .length > 0) { + if (typeof data == "object" && Object.keys(data).length > 0) { try { data = JSON.stringify(data); console.log(data) @@ -1373,8 +1335,7 @@ print = function(data) { console.log(typeof data + ":" + data.length); return } - } else if (typeof data == "object" && Object.keys(data) - .length < 1) { + } else if (typeof data == "object" && Object.keys(data).length < 1) { console.log("null object") } else { console.log(data) @@ -1403,9 +1364,7 @@ function getHtml(url) { } let cookie = getItem(RULE_CK, ""); if (cookie) { - if (obj.headers && !Object.keys(obj.headers) - .map(it => it.toLowerCase()) - .includes("cookie")) { + if (obj.headers && !Object.keys(obj.headers).map(it => it.toLowerCase()).includes("cookie")) { log("历史无cookie,新增过验证后的cookie"); obj.headers["Cookie"] = cookie } else if (obj.headers && obj.headers.cookie && obj.headers.cookie !== cookie) { @@ -1484,8 +1443,7 @@ function homeParse(homeObj) { list.forEach((it, idex) => { try { let name = _pdfh(it, p[1]); - if (homeObj.cate_exclude && new RegExp(homeObj.cate_exclude) - .test(name)) { + if (homeObj.cate_exclude && new RegExp(homeObj.cate_exclude).test(name)) { return } let url = _pd(it, p[2]); @@ -1509,8 +1467,7 @@ function homeParse(homeObj) { } } } - classes = classes.filter(it => !homeObj.cate_exclude || !new RegExp(homeObj.cate_exclude) - .test(it.type_name)); + classes = classes.filter(it => !homeObj.cate_exclude || !new RegExp(homeObj.cate_exclude).test(it.type_name)); let resp = { class: classes }; @@ -1533,8 +1490,7 @@ function homeVodParse(homeVodObj) { let d = []; MY_URL = homeVodObj.homeUrl; console.log(MY_URL); - let t1 = (new Date) - .getTime(); + let t1 = (new Date).getTime(); let p = homeVodObj.推荐; print("p:" + p); if (p === "*" && rule.一级) { @@ -1670,16 +1626,14 @@ function homeVodParse(homeVodObj) { } } catch (e) {} } - let t2 = (new Date) - .getTime(); + let t2 = (new Date).getTime(); console.log("加载首页推荐耗时:" + (t2 - t1) + "毫秒"); if (rule.图片替换) { if (rule.图片替换.startsWith("js:")) { d.forEach(it => { try { var input = it.vod_pic; - eval(rule.图片替换.trim() - .replace("js:", "")); + eval(rule.图片替换.trim().replace("js:", "")); it.vod_pic = input } catch (e) { log(`图片:${it.vod_pic}替换错误:${e.message}`) @@ -1735,8 +1689,7 @@ function categoryParse(cateObj) { let fl = cateObj.filter ? cateObj.extend : {}; if (rule.filter_def && typeof rule.filter_def === "object") { try { - if (Object.keys(rule.filter_def) - .length > 0 && rule.filter_def.hasOwnProperty(cateObj.tid)) { + if (Object.keys(rule.filter_def).length > 0 && rule.filter_def.hasOwnProperty(cateObj.tid)) { let self_fl_def = rule.filter_def[cateObj.tid]; if (self_fl_def && typeof self_fl_def === "object") { let fl_def = JSON.parse(JSON.stringify(self_fl_def)); @@ -1758,9 +1711,7 @@ function categoryParse(cateObj) { let url_rep = url.match(/.*?\((.*)\)/)[1]; let cnt_page = url_rep.replaceAll("fypage", cateObj.pg); let cnt_pg = eval(cnt_page); - url = url.replaceAll(url_rep, cnt_pg) - .replaceAll("(", "") - .replaceAll(")", "") + url = url.replaceAll(url_rep, cnt_pg).replaceAll("(", "").replaceAll(")", "") } else { url = url.replaceAll("fypage", cateObj.pg) } @@ -1775,8 +1726,7 @@ function categoryParse(cateObj) { var input = MY_URL; const MY_PAGE = cateObj.pg; var desc = ""; - eval(p.trim() - .replace("js:", "")); + eval(p.trim().replace("js:", "")); d = VODS } else { p = p.split(";"); @@ -1797,15 +1747,12 @@ function categoryParse(cateObj) { } let list = _pdfa(html, p[0]); list.forEach(it => { - let links = p[4].split("+") - .map(p4 => { + let links = p[4].split("+").map(p4 => { return !rule.detailUrl ? _pd(it, p4, MY_URL) : _pdfh(it, p4) }); let link = links.join("$"); let vod_id = rule.detailUrl ? MY_CATE + "$" + link : link; - let vod_name = _pdfh(it, p[1]) - .replace(/\n|\t/g, "") - .trim(); + let vod_name = _pdfh(it, p[1]).replace(/\n|\t/g, "").trim(); let vod_pic = _pd(it, p[2], MY_URL); if (rule.二级 === "*") { vod_id = vod_id + "@@" + vod_name + "@@" + vod_pic @@ -1814,9 +1761,7 @@ function categoryParse(cateObj) { vod_id: vod_id, vod_name: vod_name, vod_pic: vod_pic, - vod_remarks: _pdfh(it, p[3]) - .replace(/\n|\t/g, "") - .trim() + vod_remarks: _pdfh(it, p[3]).replace(/\n|\t/g, "").trim() }) }) } @@ -1829,8 +1774,7 @@ function categoryParse(cateObj) { d.forEach(it => { try { var input = it.vod_pic; - eval(rule.图片替换.trim() - .replace("js:", "")); + eval(rule.图片替换.trim().replace("js:", "")); it.vod_pic = input } catch (e) { log(`图片:${it.vod_pic}替换错误:${e.message}`) @@ -1905,9 +1849,7 @@ function searchParse(searchObj) { let url_rep = url.match(/.*?\((.*)\)/)[1]; let cnt_page = url_rep.replaceAll("fypage", searchObj.pg); let cnt_pg = eval(cnt_page); - url = url.replaceAll(url_rep, cnt_pg) - .replaceAll("(", "") - .replaceAll(")", "") + url = url.replaceAll(url_rep, cnt_pg).replaceAll("(", "").replaceAll(")", "") } else { url = url.replaceAll("fypage", searchObj.pg) } @@ -1920,8 +1862,7 @@ function searchParse(searchObj) { const KEY = searchObj.wd; var input = MY_URL; var detailUrl = rule.detailUrl || ""; - eval(p.trim() - .replace("js:", "")); + eval(p.trim().replace("js:", "")); d = VODS } else { p = p.split(";"); @@ -1936,8 +1877,7 @@ function searchParse(searchObj) { let is_json = p0.startsWith("json:"); p0 = p0.replace(/^(jsp:|json:|jq:)/, ""); try { - let req_method = MY_URL.split(";") - .length > 1 ? MY_URL.split(";")[1].toLowerCase() : "get"; + let req_method = MY_URL.split(";").length > 1 ? MY_URL.split(";")[1].toLowerCase() : "get"; let html; if (req_method === "post") { let rurls = MY_URL.split(";")[0].split("#"); @@ -1994,8 +1934,7 @@ function searchParse(searchObj) { let p4 = getPP(p, 4, pp, 4); let p5 = getPP(p, 5, pp, 5); list.forEach(it => { - let links = p4.split("+") - .map(_p4 => { + let links = p4.split("+").map(_p4 => { return !rule.detailUrl ? _pd(it, _p4, MY_URL) : _pdfh(it, _p4) }); let link = links.join("$"); @@ -2006,9 +1945,7 @@ function searchParse(searchObj) { content = "" } let vod_id = link; - let vod_name = _pdfh(it, p1) - .replace(/\n|\t/g, "") - .trim(); + let vod_name = _pdfh(it, p1).replace(/\n|\t/g, "").trim(); let vod_pic = _pd(it, p2, MY_URL); if (rule.二级 === "*") { vod_id = vod_id + "@@" + vod_name + "@@" + vod_pic @@ -2017,11 +1954,8 @@ function searchParse(searchObj) { vod_id: vod_id, vod_name: vod_name, vod_pic: vod_pic, - vod_remarks: _pdfh(it, p3) - .replace(/\n|\t/g, "") - .trim(), - vod_content: content.replace(/\n|\t/g, "") - .trim() + vod_remarks: _pdfh(it, p3).replace(/\n|\t/g, "").trim(), + vod_content: content.replace(/\n|\t/g, "").trim() }; d.push(ob) }) @@ -2036,8 +1970,7 @@ function searchParse(searchObj) { d.forEach(it => { try { var input = it.vod_pic; - eval(rule.图片替换.trim() - .replace("js:", "")); + eval(rule.图片替换.trim().replace("js:", "")); it.vod_pic = input } catch (e) { log(`图片:${it.vod_pic}替换错误:${e.message}`) @@ -2069,8 +2002,7 @@ function searchParse(searchObj) { }) } function detailParse(detailObj) { - let t1 = (new Date) - .getTime(); + let t1 = (new Date).getTime(); fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); let orId = detailObj.orId; let vod_name = "片名"; @@ -2103,8 +2035,7 @@ function detailParse(detailObj) { if (detailObj.二级访问前) { try { print(`尝试在二级访问前执行代码:${detailObj.二级访问前}`); - eval(detailObj.二级访问前.trim() - .replace("js:", "")) + eval(detailObj.二级访问前.trim().replace("js:", "")) } catch (e) { print(`二级访问前执行代码出现错误:${e.message}`) } @@ -2115,18 +2046,15 @@ function detailParse(detailObj) { vod.vod_actor = "没有二级,只有一级链接直接嗅探播放"; vod.vod_content = MY_URL; vod.vod_play_url = "嗅探播放$" + MY_URL.split("@@")[0] - } else if (typeof p === "string" && p.trim() - .startsWith("js:")) { + } else if (typeof p === "string" && p.trim().startsWith("js:")) { const TYPE = "detail"; var input = MY_URL; var play_url = ""; - eval(p.trim() - .replace("js:", "")); + eval(p.trim().replace("js:", "")); vod = VOD; console.log(JSON.stringify(vod)) } else if (p && typeof p === "object") { - let tt1 = (new Date) - .getTime(); + let tt1 = (new Date).getTime(); if (!html) { html = getHtml(MY_URL) } @@ -2146,49 +2074,31 @@ function detailParse(detailObj) { print("二级默认jq"); _ps = parseTags.jq } - let tt2 = (new Date) - .getTime(); + let tt2 = (new Date).getTime(); print(`二级${MY_URL}获取并装载源码耗时:${tt2-tt1}毫秒`); _pdfa = _ps.pdfa; _pdfh = _ps.pdfh; _pd = _ps.pd; if (p.title) { let p1 = p.title.split(";"); - vod.vod_name = _pdfh(html, p1[0]) - .replace(/\n|\t/g, "") - .trim(); - let type_name = p1.length > 1 ? _pdfh(html, p1[1]) - .replace(/\n|\t/g, "") - .replace(/ /g, "") - .trim() : ""; + vod.vod_name = _pdfh(html, p1[0]).replace(/\n|\t/g, "").trim(); + let type_name = p1.length > 1 ? _pdfh(html, p1[1]).replace(/\n|\t/g, "").replace(/ /g, "").trim() : ""; vod.type_name = type_name || vod.type_name } if (p.desc) { try { let p1 = p.desc.split(";"); - vod.vod_remarks = _pdfh(html, p1[0]) - .replace(/\n|\t/g, "") - .trim(); - vod.vod_year = p1.length > 1 ? _pdfh(html, p1[1]) - .replace(/\n|\t/g, "") - .trim() : ""; - vod.vod_area = p1.length > 2 ? _pdfh(html, p1[2]) - .replace(/\n|\t/g, "") - .trim() : ""; - vod.vod_actor = p1.length > 3 ? _pdfh(html, p1[3]) - .replace(/\n|\t/g, "") - .trim() : ""; - vod.vod_director = p1.length > 4 ? _pdfh(html, p1[4]) - .replace(/\n|\t/g, "") - .trim() : "" + vod.vod_remarks = _pdfh(html, p1[0]).replace(/\n|\t/g, "").trim(); + vod.vod_year = p1.length > 1 ? _pdfh(html, p1[1]).replace(/\n|\t/g, "").trim() : ""; + vod.vod_area = p1.length > 2 ? _pdfh(html, p1[2]).replace(/\n|\t/g, "").trim() : ""; + vod.vod_actor = p1.length > 3 ? _pdfh(html, p1[3]).replace(/\n|\t/g, "").trim() : ""; + vod.vod_director = p1.length > 4 ? _pdfh(html, p1[4]).replace(/\n|\t/g, "").trim() : "" } catch (e) {} } if (p.content) { try { let p1 = p.content.split(";"); - vod.vod_content = _pdfh(html, p1[0]) - .replace(/\n|\t/g, "") - .trim() + vod.vod_content = _pdfh(html, p1[0]).replace(/\n|\t/g, "").trim() } catch (e) {} } if (p.img) { @@ -2216,14 +2126,12 @@ function detailParse(detailObj) { let tab_text = p.tab_text || "body&&Text"; let new_map = {}; for (let v of vHeader) { - let v_title = _pdfh(v, tab_text) - .trim(); + let v_title = _pdfh(v, tab_text).trim(); if (!v_title) { v_title = "线路空" } console.log(v_title); - if (tab_exclude && new RegExp(tab_exclude) - .test(v_title)) { + if (tab_exclude && new RegExp(tab_exclude).test(v_title)) { continue } if (!new_map.hasOwnProperty(v_title)) { @@ -2254,16 +2162,13 @@ function detailParse(detailObj) { for (let i in LISTS) { if (LISTS.hasOwnProperty(i)) { try { - LISTS[i] = LISTS[i].map(it => it.split("$") - .slice(0, 2) - .join("$")) + LISTS[i] = LISTS[i].map(it => it.split("$").slice(0, 2).join("$")) } catch (e) { print(`格式化LISTS发生错误:${e.message}`) } } } - vod_play_url = LISTS.map(it => it.join("#")) - .join(vod_play_url) + vod_play_url = LISTS.map(it => it.join("#")).join(vod_play_url) } catch (e) { print(`js执行lists: 发生错误:${e.message}`) } @@ -2271,27 +2176,20 @@ function detailParse(detailObj) { let list_text = p.list_text || "body&&Text"; let list_url = p.list_url || "a&&href"; let list_url_prefix = p.list_url_prefix || ""; - let is_tab_js = p.tabs.trim() - .startsWith("js:"); + let is_tab_js = p.tabs.trim().startsWith("js:"); for (let i = 0; i < playFrom.length; i++) { let tab_name = playFrom[i]; - let tab_ext = p.tabs.split(";") - .length > 1 && !is_tab_js ? p.tabs.split(";")[1] : ""; - let p1 = p.lists.replaceAll("#idv", tab_name) - .replaceAll("#id", i); - tab_ext = tab_ext.replaceAll("#idv", tab_name) - .replaceAll("#id", i); + let tab_ext = p.tabs.split(";").length > 1 && !is_tab_js ? p.tabs.split(";")[1] : ""; + let p1 = p.lists.replaceAll("#idv", tab_name).replaceAll("#id", i); + tab_ext = tab_ext.replaceAll("#idv", tab_name).replaceAll("#id", i); let tabName = tab_ext ? _pdfh(html, tab_ext) : tab_name; console.log(tabName); let new_vod_list = []; - let tt1 = (new Date) - .getTime(); + let tt1 = (new Date).getTime(); if (typeof pdfl === "function") { new_vod_list = pdfl(html, p1, list_text, list_url, MY_URL); if (list_url_prefix) { - new_vod_list = new_vod_list.map(it => it.split("$")[0] + "$" + list_url_prefix + it.split("$") - .slice(1) - .join("$")) + new_vod_list = new_vod_list.map(it => it.split("$")[0] + "$" + list_url_prefix + it.split("$").slice(1).join("$")) } } else { let vodList = []; @@ -2301,8 +2199,7 @@ function detailParse(detailObj) { } catch (e) {} for (let i = 0; i < vodList.length; i++) { let it = vodList[i]; - new_vod_list.push(_pdfh(it, list_text) - .trim() + "$" + list_url_prefix + _pd(it, list_url, MY_URL)) + new_vod_list.push(_pdfh(it, list_text).trim() + "$" + list_url_prefix + _pd(it, list_url, MY_URL)) } } if (new_vod_list.length > 0) { @@ -2328,8 +2225,7 @@ function detailParse(detailObj) { if (!vod.vod_id || vod_id.includes("$") && vod.vod_id !== vod_id) { vod.vod_id = vod_id } - let t2 = (new Date) - .getTime(); + let t2 = (new Date).getTime(); console.log(`加载二级界面${MY_URL}耗时:${t2-t1}毫秒`); try { vod = vodDeal(vod) @@ -2342,8 +2238,7 @@ function detailParse(detailObj) { } function get_tab_index(vod) { let obj = {}; - vod.vod_play_from.split("$$$") - .forEach((it, index) => { + vod.vod_play_from.split("$$$").forEach((it, index) => { obj[it] = index }); return obj @@ -2371,8 +2266,7 @@ function vodDeal(vod) { } play_ordered_list = tab_list.map(it => vod_play_url[tab_index_dict[it]]) } - if (rule.tab_rename && typeof rule.tab_rename === "object" & Object.keys(rule.tab_rename) - .length > 0) { + if (rule.tab_rename && typeof rule.tab_rename === "object" & Object.keys(rule.tab_rename).length > 0) { tab_renamed_list = tab_list.map(it => rule.tab_rename[it] || it); tab_list = tab_renamed_list } @@ -2413,8 +2307,7 @@ function playParse(playObj) { try { let lazy_code = rule.lazy.trim(); if (lazy_code.startsWith("js:")) { - lazy_code = lazy_code.replace("js:", "") - .trim() + lazy_code = lazy_code.replace("js:", "").trim() } print("开始执行js免嗅=>" + lazy_code); eval(lazy_code); @@ -2511,8 +2404,7 @@ function getOriginalJs(js_code) { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 - }) - .toString(CryptoJS.enc.Utf8); + }).toString(CryptoJS.enc.Utf8); return encrypted } let error_log = false; @@ -2608,8 +2500,7 @@ function init(ext) { console.log(`规则加载失败,不支持的规则类型:${typeof ext}`); return } - rule.host = (rule.host || "") - .rstrip("/"); + rule.host = (rule.host || "").rstrip("/"); HOST = rule.host; if (rule.hostJs) { console.log(`检测到hostJs,准备执行...`); @@ -2627,8 +2518,7 @@ function init(ext) { headers: host_headers }); let match_muban = ""; - let muban_keys = Object.keys(muban) - .filter(it => !/默认|短视2|采集1/.test(it)); + let muban_keys = Object.keys(muban).filter(it => !/默认|短视2|采集1/.test(it)); for (let muban_key of muban_keys) { try { let host_data = JSON.parse(home({}, host_html, muban[muban_key].class_parse)); @@ -2644,8 +2534,7 @@ function init(ext) { if (match_muban) { muban["自动"] = muban[match_muban]; if (rule["模板修改"] && rule["模板修改"].startsWith("js:")) { - eval(rule["模板修改"].replace("js:", "") - .trim()) + eval(rule["模板修改"].replace("js:", "").trim()) } } else { delete rule["模板"] @@ -2658,16 +2547,10 @@ function init(ext) { print("继承模板:" + rule.模板); rule = Object.assign(muban[rule.模板], rule) } - let rule_cate_excludes = (rule.cate_exclude || "") - .split("|") - .filter(it => it.trim()); - let rule_tab_excludes = (rule.tab_exclude || "") - .split("|") - .filter(it => it.trim()); - rule_cate_excludes = rule_cate_excludes.concat(CATE_EXCLUDE.split("|") - .filter(it => it.trim())); - rule_tab_excludes = rule_tab_excludes.concat(TAB_EXCLUDE.split("|") - .filter(it => it.trim())); + let rule_cate_excludes = (rule.cate_exclude || "").split("|").filter(it => it.trim()); + let rule_tab_excludes = (rule.tab_exclude || "").split("|").filter(it => it.trim()); + rule_cate_excludes = rule_cate_excludes.concat(CATE_EXCLUDE.split("|").filter(it => it.trim())); + rule_tab_excludes = rule_tab_excludes.concat(TAB_EXCLUDE.split("|").filter(it => it.trim())); rule.cate_exclude = rule_cate_excludes.join("|"); rule.tab_exclude = rule_tab_excludes.join("|"); rule.类型 = rule.类型 || "影视"; @@ -2763,8 +2646,7 @@ function home(filter, home_html, class_parse) { console.log("home"); home_html = home_html || ""; class_parse = class_parse || ""; - if (typeof rule.filter === "string" && rule.filter.trim() - .length > 0) { + if (typeof rule.filter === "string" && rule.filter.trim().length > 0) { try { let filter_json = ungzip(rule.filter.trim()); rule.filter = JSON.parse(filter_json) @@ -2816,8 +2698,7 @@ function detail(vod_url) { let detailUrl = vod_url.split("@@")[0]; let url; if (!detailUrl.startsWith("http") && !detailUrl.includes("/")) { - url = rule.detailUrl.replaceAll("fyid", detailUrl) - .replaceAll("fyclass", fyclass) + url = rule.detailUrl.replaceAll("fyid", detailUrl).replaceAll("fyclass", fyclass) } else if (detailUrl.includes("/")) { url = urljoin(rule.homeUrl, detailUrl) } else { @@ -2920,8 +2801,7 @@ function DRPY() { fixAdM3u8Ai: fixAdM3u8Ai } } -export -default { +export default { runMain: runMain, getRule: getRule, init: init, diff --git a/JS/大米动漫.js b/JS/大米动漫.js new file mode 100644 index 0000000..06eac62 --- /dev/null +++ b/JS/大米动漫.js @@ -0,0 +1,8 @@ +var rule = { + 模板: 'mxpro', + title: '大米动漫[漫]', + host: 'https://damidm.com/', + url: 'show/fyclass--------fypage---.html', + searchUrl: '/search/**----------fypage---.html', + class_parse: '.navbar-items li;a&&Text;a&&href;/(\\d+).html', +} \ No newline at end of file diff --git a/JS/异世界.js b/JS/异世界.js index 98cde2c..631da0d 100644 --- a/JS/异世界.js +++ b/JS/异世界.js @@ -1,6 +1,6 @@ var rule={ title:'异世界动漫', - host:'https://www.lldm.net', + host:'https://www.dmmiku.com/', homeUrl:'/index.php/vod/show/id/22.html', // url:'/index.php/vod/show/class/fyclass/id/20/page/fypage.html', url:'/index.php/vod/show/fyclassfyfilter.html', diff --git a/JS/樱花动漫.js b/JS/樱花动漫.js index 4745362..b90099a 100644 --- a/JS/樱花动漫.js +++ b/JS/樱花动漫.js @@ -1,6 +1,6 @@ var rule = { 模板: '首图', - title: '樱花动漫', + title: '樱花动漫[漫]', host: 'https://katedm.com/', url: '/list/fyclass-fypage.html', searchUrl: '/search/**----------fypage---.html', diff --git a/JS/次元城.js b/JS/次元城.js index e309380..1e14fd9 100644 --- a/JS/次元城.js +++ b/JS/次元城.js @@ -1,5 +1,5 @@ var rule = { - title: '次元城动漫',//规则标题,没有实际作用,但是可以作为cms类名称依据 + title: '次元城动漫[漫]',//规则标题,没有实际作用,但是可以作为cms类名称依据 编码: '',//不填就默认utf-8 搜索编码: '',//不填则不编码,默认都是按utf-8.可优先于全局编码属性.比如网页源码编码是gbk,这里可以指定utf-8搜索独立编码。多数情况这个属性不填或者填写gbk应对特殊的网站搜索 host: 'https://www.cycanime.com',//网页的域名根,包含http头如 https://www,baidu.com diff --git a/JS/花子动漫.js b/JS/花子动漫.js index 0e03fd0..52af9a6 100644 --- a/JS/花子动漫.js +++ b/JS/花子动漫.js @@ -1,72 +1,72 @@ -var rule = { - title: '花子动漫[漫]', - host: 'https://www.huazidm.com', - class_name: 'TV动漫&剧场&特摄', - class_url: '1&2&3', - searchUrl: '/index.php/ajax/suggest?mid=1&wd=**&limit=50', - searchUrl: '/vodsearch/**----------fypage---.html', - searchable: 2, - quickSearch: 0, - headers: { - 'User-Agent': 'MOBILE_UA', - }, - url: '/index.php/api/vod#type=fyclassfyfilter&page=fypage', - filterable: 0, - filter_url: '&class={{fl.class}}&year={{fl.year}}&letter={{fl.letter}}&by={{fl.by}}', - filter: 'H4sIAAAAAAAAA+2W204TURSG32WuMdnT0nbDnZzP57PhopImEhETWk0IIUFOloNQDLSigGJCLCIWhJCWgr4MM9O+hdPO2mstDzE10cSYudv/989u55t0uteUpmuVd6a0+6FJrVIbGQuGw1qZNh58ELKjdZo19lbs/Dg49ihUvG7cxsZCMj+XLGA7aNNlQK9mb9Jxa2sVCsrqCmv7sxGLQg0Bd8fWjI9HaqsTcN/ccW5/Ru1zAnaXKSt6qjonYHf4JXexrDon4PcdPDUyWfV9TlCdGX1hxhPQQSjlPs3YnvVhQ+1zAnaJAyOdVp0T8D7fbdC9QMB9n7LmvHpmELB7s2+8OladE7B7skLPBQI6LD7Pbx8qByfgvrWkFVtU+5yA3c6l/TRU5wTV5V+f3WRi0EFQXS62m1tbgg4C3WfMnInjfRYDdnPL5uxL1TkBu7P9/O5ba+u9qjHjFem0GV03NzPqCsz4HE7Wc6lzuoIyfsbVkbWZZZ+BGd0WlHRhNT1c4M67NBkKTtCrZGTOb7LXJb5KHuEpB1ZcMu4l7uXcQ9zDuU5c51wQF4zrFcjtJeOSuOQ8QDzAuZ+4n3MfcR/n5KtzX518de6rk6/OfXXy1bmvTr469xXkK7ivIF/BfQX5Cu4ryFdwX0G+gvsK8hXcV5Cv4L6CfAX3FeQruK8gX0G+ekWF8i0uGZfEJecB4gHO/cT9nPuI+zgvJ17OuZe4l3MPcQ/nOnGdc0Gc+0ryldxXkq/kvpJ8JfeV5Cu5ryRfyX0l+UruK8lXcl9JvpL7SvKV3FeSr73kfztjoUgkxP94jhNm6lmJfzy3AdxGUgWkCkk1kGokNUBqkNQCqUVSB6QOST2QeiQNQBqQNAJpRNIEpAlJM5BmJC1AWpC0AmlF0gakDUk7kHYkHUA6kHQC6UTSBaQLSTeQbiQ9QHqQ9ALpRdIHpA9JP5B+JANABpAMAhlEMgRkCIm4pd6Bwor/VO5O0s/ETFzkE+c//EzM1SVzZ8aMn8BHREbtq/F0LJb2QAblvdFImJe51LwRVbNEeOThRKjw9cNlmuefGDl/OVb+hdHxvxgPf3cEdAcidyByByK1dAcidyByByJ3IPp+IPL+qYFoOXlzvaOObieUMrb8dMRwj2736HaPbrV0j2736HaPbvfo/vbonv4K+TrlXkAbAAA=', - filter_def: {}, - detailUrl: '/voddetail/fyid.html', - play_parse: true, - sniffer: 1, - is_video: 'obj/tos|bd.xhscdn|/ugc/', - lazy: $js.toString(() => { - input = { - parse: 1, - url: input, - //js:'try{let urls=Array.from(document.querySelectorAll("iframe")).filter(x=>x.src.includes("?url="));if(urls){location.href=urls[0].src}}catch{}document.querySelector("button").click()', - js: 'try{location.href=document.querySelector("#playleft iframe").src}catch{}document.querySelector("button.swal-button--confirm").click()', - parse_extra: '&is_pc=1&custom_regex=' + rule.is_video, - } - }), - limit: 6, - 推荐: '.list-vod.flex .public-list-box;a&&title;.lazy&&data-original;.public-list-prb&&Text;a&&href', - 一级: $js.toString(() => { - let body = input.split("#")[1]; - let t = Math.round(new Date / 1e3).toString(); - let key = md5("DS" + t + "DCC147D11943AF75"); - let url = input.split("#")[0]; - body = body + "&time=" + t + "&key=" + key; - print(body); - fetch_params.body = body; - let html = post(url, fetch_params); - let data = JSON.parse(html); - VODS = data.list.map(function (it) { - it.vod_pic = urljoin2(input.split("/i")[0], it.vod_pic); - return it - }); - }), - 二级: { - title: '.slide-info-title&&Text;.slide-info:eq(3)--strong&&Text', - img: '.detail-pic&&data-original', - desc: '.fraction&&Text;.slide-info-remarks:eq(1)&&Text;.slide-info-remarks:eq(2)&&Text;.slide-info:eq(2)--strong&&Text;.slide-info:eq(1)--strong&&Text', - content: '#height_limit&&Text', - tabs: '.anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a', - tab_text: '.swiper-slide&&Text', - lists: '.anthology-list-box:eq(#id) li', - }, - 搜索: 'json:list;name;pic;;id', - 搜索: $js.toString(() => { - let html = fetch(input); - let list = pdfa(html, ".public-list-box"); - VODS = list.map(x => { - return { - vod_name: pdfh(x, ".thumb-txt&&Text"), - vod_pic: pdfh(x, ".lazy&&data-src"), - vod_remarks: pdfh(x, ".public-list-prb&&Text"), - vod_content: pdfh(x, ".thumb-blurb&&Text"), - vod_id: pdfh(x, "a&&href") - } - }); - }), - 图片替换: '&=>&' +var rule = { + title: '花子动漫[漫]', + host: 'https://www.huazidm.com', + class_name: 'TV动漫&剧场&特摄', + class_url: '1&2&3', + searchUrl: '/index.php/ajax/suggest?mid=1&wd=**&limit=50', + searchUrl: '/vodsearch/**----------fypage---.html', + searchable: 2, + quickSearch: 0, + headers: { + 'User-Agent': 'MOBILE_UA', + }, + url: '/index.php/api/vod#type=fyclassfyfilter&page=fypage', + filterable: 0, + filter_url: '&class={{fl.class}}&year={{fl.year}}&letter={{fl.letter}}&by={{fl.by}}', + filter: 'H4sIAAAAAAAAA+2W204TURSG32WuMdnT0nbDnZzP57PhopImEhETWk0IIUFOloNQDLSigGJCLCIWhJCWgr4MM9O+hdPO2mstDzE10cSYudv/989u55t0uteUpmuVd6a0+6FJrVIbGQuGw1qZNh58ELKjdZo19lbs/Dg49ihUvG7cxsZCMj+XLGA7aNNlQK9mb9Jxa2sVCsrqCmv7sxGLQg0Bd8fWjI9HaqsTcN/ccW5/Ru1zAnaXKSt6qjonYHf4JXexrDon4PcdPDUyWfV9TlCdGX1hxhPQQSjlPs3YnvVhQ+1zAnaJAyOdVp0T8D7fbdC9QMB9n7LmvHpmELB7s2+8OladE7B7skLPBQI6LD7Pbx8qByfgvrWkFVtU+5yA3c6l/TRU5wTV5V+f3WRi0EFQXS62m1tbgg4C3WfMnInjfRYDdnPL5uxL1TkBu7P9/O5ba+u9qjHjFem0GV03NzPqCsz4HE7Wc6lzuoIyfsbVkbWZZZ+BGd0WlHRhNT1c4M67NBkKTtCrZGTOb7LXJb5KHuEpB1ZcMu4l7uXcQ9zDuU5c51wQF4zrFcjtJeOSuOQ8QDzAuZ+4n3MfcR/n5KtzX518de6rk6/OfXXy1bmvTr469xXkK7ivIF/BfQX5Cu4ryFdwX0G+gvsK8hXcV5Cv4L6CfAX3FeQruK8gX0G+ekWF8i0uGZfEJecB4gHO/cT9nPuI+zgvJ17OuZe4l3MPcQ/nOnGdc0Gc+0ryldxXkq/kvpJ8JfeV5Cu5ryRfyX0l+UruK8lXcl9JvpL7SvKV3FeSr73kfztjoUgkxP94jhNm6lmJfzy3AdxGUgWkCkk1kGokNUBqkNQCqUVSB6QOST2QeiQNQBqQNAJpRNIEpAlJM5BmJC1AWpC0AmlF0gakDUk7kHYkHUA6kHQC6UTSBaQLSTeQbiQ9QHqQ9ALpRdIHpA9JP5B+JANABpAMAhlEMgRkCIm4pd6Bwor/VO5O0s/ETFzkE+c//EzM1SVzZ8aMn8BHREbtq/F0LJb2QAblvdFImJe51LwRVbNEeOThRKjw9cNlmuefGDl/OVb+hdHxvxgPf3cEdAcidyByByK1dAcidyByByJ3IPp+IPL+qYFoOXlzvaOObieUMrb8dMRwj2736HaPbrV0j2736HaPbvfo/vbonv4K+TrlXkAbAAA=', + filter_def: {}, + detailUrl: '/voddetail/fyid.html', + play_parse: true, + sniffer: 1, + is_video: 'obj/tos|bd.xhscdn|/ugc/', + lazy: $js.toString(() => { + input = { + parse: 1, + url: input, + //js:'try{let urls=Array.from(document.querySelectorAll("iframe")).filter(x=>x.src.includes("?url="));if(urls){location.href=urls[0].src}}catch{}document.querySelector("button").click()', + js: 'try{location.href=document.querySelector("#playleft iframe").src}catch{}document.querySelector("button.swal-button--confirm").click()', + parse_extra: '&is_pc=1&custom_regex=' + rule.is_video, + } + }), + limit: 6, + 推荐: '.list-vod.flex .public-list-box;a&&title;.lazy&&data-original;.public-list-prb&&Text;a&&href', + 一级: $js.toString(() => { + let body = input.split("#")[1]; + let t = Math.round(new Date / 1e3).toString(); + let key = md5("DS" + t + "DCC147D11943AF75"); + let url = input.split("#")[0]; + body = body + "&time=" + t + "&key=" + key; + print(body); + fetch_params.body = body; + let html = post(url, fetch_params); + let data = JSON.parse(html); + VODS = data.list.map(function (it) { + it.vod_pic = urljoin2(input.split("/i")[0], it.vod_pic); + return it + }); + }), + 二级: { + title: '.slide-info-title&&Text;.slide-info:eq(3)--strong&&Text', + img: '.detail-pic&&data-original', + desc: '.fraction&&Text;.slide-info-remarks:eq(1)&&Text;.slide-info-remarks:eq(2)&&Text;.slide-info:eq(2)--strong&&Text;.slide-info:eq(1)--strong&&Text', + content: '#height_limit&&Text', + tabs: '.anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a', + tab_text: '.swiper-slide&&Text', + lists: '.anthology-list-box:eq(#id) li', + }, + 搜索: 'json:list;name;pic;;id', + 搜索: $js.toString(() => { + let html = fetch(input); + let list = pdfa(html, ".public-list-box"); + VODS = list.map(x => { + return { + vod_name: pdfh(x, ".thumb-txt&&Text"), + vod_pic: pdfh(x, ".lazy&&data-src"), + vod_remarks: pdfh(x, ".public-list-prb&&Text"), + vod_content: pdfh(x, ".thumb-blurb&&Text"), + vod_id: pdfh(x, "a&&href") + } + }); + }), + 图片替换: '&=>&' } \ No newline at end of file diff --git a/JS/路漫漫.js b/JS/路漫漫.js index dc10b5d..6114621 100644 --- a/JS/路漫漫.js +++ b/JS/路漫漫.js @@ -1,47 +1,40 @@ var rule = { - title:'路漫漫', - // host:'https://www.96ba.com', - host:'https://m.lmm52.com', - // url:'/vod/show/id/fyclass/page/fypage.html', - url:'/vod/show/id/fyclassfyfilter.html', - filterable:1,//是否启用分类筛选, - filter_url:'{{fl.by}}/page/fypage{{fl.year}}', - filter:{ - "ribendongman":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"更早","v":"/year/2013-1980"}]},{"key":"by","name":"排序","value":[{"n":"更新","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"},{"n":"点赞","v":"/by/up"}]}], - "guochandongman":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"更早","v":"/year/2013-1980"}]},{"key":"by","name":"排序","value":[{"n":"更新","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"},{"n":"点赞","v":"/by/up"}]}], - "oumeidongman":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"更早","v":"/year/2013-1980"}]},{"key":"by","name":"排序","value":[{"n":"更新","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"},{"n":"点赞","v":"/by/up"}]}], - "ribendonghuadianying":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"更早","v":"/year/2013-1980"}]},{"key":"by","name":"排序","value":[{"n":"更新","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"},{"n":"点赞","v":"/by/up"}]}], - "guochandonghuadianying":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"更早","v":"/year/2013-1980"}]},{"key":"by","name":"排序","value":[{"n":"更新","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"},{"n":"点赞","v":"/by/up"}]}], - "oumeidonghuadianying":[{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2024","v":"/year/2024"},{"n":"2023","v":"/year/2023"},{"n":"2022","v":"/year/2022"},{"n":"2021","v":"/year/2021"},{"n":"2020","v":"/year/2020"},{"n":"2019","v":"/year/2019"},{"n":"2018","v":"/year/2018"},{"n":"2017","v":"/year/2017"},{"n":"2016","v":"/year/2016"},{"n":"2015","v":"/year/2015"},{"n":"2014","v":"/year/2014"},{"n":"更早","v":"/year/2013-1980"}]},{"key":"by","name":"排序","value":[{"n":"更新","v":"/by/time"},{"n":"人气","v":"/by/hits"},{"n":"评分","v":"/by/score"},{"n":"点赞","v":"/by/up"}]}] - }, - searchUrl:'/vod/search/page/fypage/wd/**.html', - searchable: 2,//是否启用全局搜索, - quickSearch: 0,//是否启用快速搜索, - headers: { - 'User-Agent': 'MOBILE_UA', - }, - class_parse:'.container&&.tag.text-light;a&&Text;a&&href;.*/(.*?).html', - play_parse: true, - lazy:`js: - var html = JSON.parse(request(input).match(/r player_.*?=(.*?) { + input = {parse: 1, url: input, js: ''}; + }), + double: false, + 推荐: "*", + 一级: ".video-img-box;h6.title&&Text;.lazyload&&data-src;.label&&Text;a&&href", + 二级: { + title: ".page-title&&Text;.tag-link&&Text", + img: ".module-item-pic&&.lazyload&&src", + desc: ".video-info-items:eq(3)&&Text;.video-info-items:eq(2)&&Text;;.video-info-items:eq(1)&&Text;.video-info-items:eq(0)&&Text", + content: ".video-info-content&&Text", + tabs: ".module-tab-item.tab-item", + lists: ".module-player-list:eq(#id) a", + tab_text: "body&&Text", + list_text: "body&&Text", + list_url: "a&&href" + }, + detailUrl: "", + 搜索: "*" } \ No newline at end of file diff --git a/JS/驴番动漫.js b/JS/驴番动漫.js index a11e9c4..f5b5819 100644 --- a/JS/驴番动漫.js +++ b/JS/驴番动漫.js @@ -3,7 +3,7 @@ Object.assign(muban.mxpro.二级, { }); var rule = { 模板: 'mxpro', - title: '驴番', + title: '驴番[漫]', host: 'https://www.lvfan.fun', url: 'vodshow/fyclass--------fypage---/', class_parse: '.navbar-items li;a&&Text;a&&href;.*/(\\d+)/',