1 line
36 KiB
Plaintext
1 line
36 KiB
Plaintext
|
import cheerio from"assets://js/lib/cheerio.min.js";import"assets://js/lib/crypto-js.js";import 模板 from"https://fs-im-kefu.7moor-fs1.com/ly/4d2c3f00-7d4c-11e5-af15-41bf63ae4ea0/1720319227738/%E6%A8%A1%E6%9D%BF.txt";import{gbkTool}from"https://fs-im-kefu.7moor-fs1.com/ly/4d2c3f00-7d4c-11e5-af15-41bf63ae4ea0/1720319220141/gbk.txt";function init_test(){console.log("init_test_start"),console.log("当前版本号:"+VERSION),console.log(RKEY),console.log(JSON.stringify(rule)),console.log("init_test_end")}function pre(){if("string"==typeof rule.预处理&&rule.预处理&&rule.预处理.trim()){let code=rule.预处理.trim();console.log("执行预处理代码:"+code),code.startsWith("js:")&&(code=code.replace("js:",""));try{eval(code)}catch(e){console.log("预处理执行失败:"+e.message)}}}let rule={},vercode="function"==typeof pdfl?"drpy2.1":"drpy2";const VERSION=vercode+" 3.9.49beta2 20231122",MOBILE_UA="Mozilla/5.0 (Linux; Android 11; M2007J3SC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045714 Mobile Safari/537.36",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",UA="Mozilla/5.0",UC_UA="Mozilla/5.0 (Linux; U; Android 9; zh-CN; MI 9 Build/PKQ1.181121.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.5.5.1035 Mobile Safari/537.36",IOS_UA="Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",RULE_CK="cookie",CATE_EXCLUDE="首页|留言|APP|下载|资讯|新闻|动态",TAB_EXCLUDE="猜你|喜欢|下载|剧情|热播",OCR_RETRY=3,OCR_API="http://drpy.nokia.press:8028/ocr/drpy/text";if(void 0===MY_URL)var MY_URL;var HOST,RKEY,fetch,print,log,rule_fetch_params,fetch_params,oheaders,_pdfh,_pdfa,_pd;const DOM_CHECK_ATTR=/(url|src|href|-original|-src|-play|-url|style)$/,SPECIAL_URL=/^(ftp|magnet|thunder|ws):/,NOADD_INDEX=/:eq|:lt|:gt|:first|:last|^body$|^#/,URLJOIN_ATTR=/(url|src|href|-original|-src|-play|-url|style)$/,SELECT_REGEX=/:eq|:lt|:gt|#/g,SELECT_REGEX_A=/:eq|:lt|:gt/g;function 是否正版(e){return new RegExp("qq.com|iqiyi.com|youku.com|mgtv.com|bilibili.com|sohu.com|ixigua.com|pptv.com|miguvideo.com|le.com|1905.com|fun.tv").test(e)}function urlDeal(e){return e?是否正版(e)?(/miguvideo/.test(e)||(e=e.split("#")[0].split("?")[0]),e):e:""}function setResult(e){return Array.isArray(e)?(VODS=[],e.forEach(function(e){let t={vod_id:e.url||"",vod_name:e.title||"",vod_remarks:e.desc||"",vod_content:e.content||"",vod_pic:e.pic_url||e.img||""},r=Object.keys(e);r.includes("tname")&&(t.type_name=e.tname||""),r.includes("tid")&&(t.type_id=e.tid||""),r.includes("year")&&(t.vod_year=e.year||""),r.includes("actor")&&(t.vod_actor=e.actor||""),r.includes("director")&&(t.vod_director=e.director||""),r.includes("area")&&(t.vod_area=e.area||""),VODS.push(t)}),VODS):[]}function setResult2(e){return VODS=e.list||[]}function setHomeResult(e){return e&&"object"==typeof e?setResult(e.list):[]}function rc(e){if("maomi_aes.js"===e){var t=CryptoJS.enc.Utf8.parse("625222f9149e961d"),r=CryptoJS.enc.Utf8.parse("5efdtf6060e2o330");return{De:function(e){return e=CryptoJS.enc.Hex.parse(e),CryptoJS.AES.decrypt(CryptoJS.enc.Base64.stringify(e),t,{iv:r,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7}).toString(CryptoJS.enc.Utf8)},En:function(e){return CryptoJS.AES.encrypt(e,t,{iv:r,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7}).ciphertext.toString()}}}return{}}function maoss(jxurl,ref,key){fetch_params=JSON.parse(JSON.stringify(rule_fetch_params)),eval(getCryptoJS());try{var getVideoInfo=function(e){return CryptoJS.AES.decrypt(e,key,{iv:iv,padding:CryptoJS.pad.Pkcs7}).toString(CryptoJS.enc.Utf8)},token_key=null==key?"dvyYRQlnPRCMdQSe":key;if(ref)var html=request(jxurl,{headers:{Referer:ref}});else var html=request(jxurl);-1!=html.indexOf("&btwaf=")&&(html=request(jxurl+"&btwaf"+html.match(/&btwaf(.*?)"/)[1],{headers:{Referer:ref}}));var token_iv=html.split('_token = "')[1]
|