mirror of
https://github.com/qist/tvbox.git
synced 2026-11-04 02:33:26 +00:00
Add files via upload
This commit is contained in:
1 parent
1db485de74
commit
ad7d4f928a
6 files changed
+25
-25
No files matched your search
+2
-2
@@ -1,7 +1,7 @@
|
||||
import './util-ym.js';
|
||||
import cheerio from 'assets://js/lib/cheerio.min.js';
|
||||
import 'assets://js/lib/crypto-js.js'
|
||||
// import muban from 'https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/js/模板.js';
|
||||
// import muban from 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/模板.js';
|
||||
|
||||
// const key = 'drpy_zbk';
|
||||
// eval(req('http://192.168.1.124:5705/libs/es6py.js').content);
|
||||
@@ -1221,7 +1221,7 @@ function init(ext) {
|
||||
try {
|
||||
// make shared jsContext happy
|
||||
if (typeof (globalThis.mubanJs) === 'undefined') {
|
||||
let mubanJs = request('https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/js/模板.js', { 'User-Agent': MOBILE_UA });
|
||||
let mubanJs = request('https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/模板.js', { 'User-Agent': MOBILE_UA });
|
||||
mubanJs = mubanJs.replace('export default', '(function() {return muban;}()) // export default');
|
||||
globalThis.mubanJs = mubanJs;
|
||||
}
|
||||
|
||||
+10
-10
@@ -1,14 +1,14 @@
|
||||
// import 'https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/es6py.js';
|
||||
// import 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/es6py.js';
|
||||
// import {是否正版,urlDeal,setResult,setResult2,setHomeResult,maoss,urlencode} from 'http://192.168.10.103:5705/libs/es6py.js';
|
||||
// import 'http://192.168.1.124:5705/libs/es6py.js';
|
||||
import cheerio from 'https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/cheerio.min.js';
|
||||
import cheerio from 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/cheerio.min.js';
|
||||
// import cheerio from 'http://192.168.10.103:5705/libs/cheerio.min.js';
|
||||
import 'https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/crypto-js.js';
|
||||
import 'https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/drT.js';
|
||||
import 模板 from 'https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/js/模板.js';
|
||||
import {gbkTool} from 'https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/gbk.js'
|
||||
import 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/crypto-js.js';
|
||||
import 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/drT.js';
|
||||
import 模板 from 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/模板.js';
|
||||
import {gbkTool} from 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/gbk.js'
|
||||
// import 'http://192.168.10.103:5705/libs/drT.js';
|
||||
// import muban from 'https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/js/模板.js';
|
||||
// import muban from 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/模板.js';
|
||||
// import muban from 'http://192.168.10.103:5705/admin/view/模板.js';
|
||||
|
||||
// const key = 'drpy_zbk';
|
||||
@@ -427,7 +427,7 @@ function decodeStr(input,encoding){
|
||||
}
|
||||
|
||||
function getCryptoJS(){
|
||||
// return request('https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/crypto-hiker.js');
|
||||
// return request('https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/crypto-hiker.js');
|
||||
return 'console.log("CryptoJS已装载");'
|
||||
}
|
||||
|
||||
@@ -1555,7 +1555,7 @@ function categoryParse(cateObj) {
|
||||
pagecount = parseInt(rule.pagecount[MY_CATE]);
|
||||
}
|
||||
let nodata = {
|
||||
list:[{vod_name:'无数据,防无限请求',vod_id:'no_data',vod_remarks:'不要点,会崩的',vod_pic:'https://ghproxy.com/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg'}],
|
||||
list:[{vod_name:'无数据,防无限请求',vod_id:'no_data',vod_remarks:'不要点,会崩的',vod_pic:'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg'}],
|
||||
total:1,pagecount:1,page:1,limit:1
|
||||
};
|
||||
let vod = d.length<1?JSON.stringify(nodata):JSON.stringify({
|
||||
@@ -2113,7 +2113,7 @@ function playParse(playObj){
|
||||
try {
|
||||
// make shared jsContext happy muban不能import,不然会造成换源继承后变量被篡改
|
||||
// if (typeof (globalThis.mubanJs) === 'undefined') {
|
||||
// let mubanJs = request('https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/js/模板.js', { 'User-Agent': MOBILE_UA });
|
||||
// let mubanJs = request('https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/模板.js', { 'User-Agent': MOBILE_UA });
|
||||
// mubanJs = mubanJs.replace('export default', '(function() {return muban;}()) // export default');
|
||||
// // console.log(mubanJs);
|
||||
// globalThis.mubanJs = mubanJs;
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
import cheerio from"https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/cheerio.min.js";import"https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/crypto-js.js";import"https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/drT.js";import 模板 from"https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/js/模板.js";import{gbkTool}from"https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/gbk.js";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(typeof rule.预处理==="string"&&rule.预处理&&rule.预处理.trim()){let code=rule.预处理.trim();console.log("执行预处理代码:"+code);if(code.startsWith("js:")){code=code.replace("js:","")}try{eval(code)}catch(e){console.log("预处理执行失败:"+e.message)}}}let rule={};const VERSION="drpy1 3.9.41beta1 20230328";const 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";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 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";const 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";const RULE_CK="cookie";const CATE_EXCLUDE="首页|留言|APP|下载|资讯|新闻|动态";const TAB_EXCLUDE="猜你|喜欢|APP|下载|剧情|热播";const OCR_RETRY=3;const OCR_API="http://drpy.nokia.press:8028/ocr/drpy/text";if(typeof MY_URL==="undefined"){var MY_URL}var RKEY;var fetch;var print;var log;var rule_fetch_params;var fetch_params;var oheaders;var _pdfh;var _pdfa;var _pd;const DOM_CHECK_ATTR=/(url|src|href|-original|-src|-play|-url)$/;const SELECT_REGEX=/:eq|:lt|:gt|#/g;const SELECT_REGEX_A=/:eq|:lt|:gt/g;if(typeof Object.assign!="function"){Object.assign=function(){var target=arguments[0];for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target}}if(!String.prototype.includes){String.prototype.includes=function(search,start){if(typeof start!=="number"){start=0}if(start+search.length>this.length){return false}else{return this.indexOf(search,start)!==-1}}}if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function(searchElement,fromIndex){if(this==null){throw new TypeError('"this" is null or not defined')}var o=Object(this);var len=o.length>>>0;if(len===0){return false}var n=fromIndex|0;var k=Math.max(n>=0?n:len-Math.abs(n),0);while(k<len){if(o[k]===searchElement){return true}k++}return false}})}if(typeof String.prototype.startsWith!="function"){String.prototype.startsWith=function(prefix){return this.slice(0,prefix.length)===prefix}}if(typeof String.prototype.endsWith!="function"){String.prototype.endsWith=function(suffix){return this.indexOf(suffix,this.length-suffix.length)!==-1}}Object.prototype.myValues=function(obj){if(obj==null){throw new TypeError("Cannot convert undefined or null to object")}var res=[];for(var k in obj){if(obj.hasOwnProperty(k)){res.push(obj[k])}}return res};if(typeof Object.prototype.values!="function"){Object.prototype.values=function(obj){if(obj==null){throw new TypeError("Cannot convert undefined or null to object")}var res=[];for(var k in obj){if(obj.hasOwnProperty(k)){res.push(obj[k])}}return res}}if(typeof Array.prototype.join!="function"){Array.prototype.join=function(emoji){emoji=emoji||"";let self=this;let str="";let i=0;if(!Array.isArray(self)){throw String(self)+"is not Array"}if(self.length===0){return""}if(self.length===1){return String(self[0])}i=1;str=this[0];for(;i<self.length;i++){str+=String(emoji)+String(self[i])}return str}}String.prototype.rstrip=function(chars){let regex=new RegExp(chars+"$");return this.replace(regex,"")};Array.prototype.append=Array.prototype.push;String.prototype.strip=String.prototype.trim;function 是否正版(vipUrl){let flag=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");return flag.test(vipUrl)}function urlDeal(vipUrl){if(!vipUrl){return""}if(!是否正版(vipUrl)){return vipUrl}if(!/miguvideo/.test(vipUrl)){vipUrl=vipUrl.split("#")[0].split("?")[0]}return vipUrl}function setResult(d){if(!Array.isArray(d)){return[]}VODS=[];d.forEach(function(it){let obj={vod_id:it.url||"",vod_name:it.title||"",vod_remarks:it.desc||"",vod_content:it.content||"",vod_pic:it.pic_url||it.img||""};let keys=Object.keys(it);if(keys.includeLine truncated
|
||||
import cheerio from"https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/cheerio.min.js";import"https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/crypto-js.js";import"https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/drT.js";import 模板 from"https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/模板.js";import{gbkTool}from"https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/gbk.js";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(typeof rule.预处理==="string"&&rule.预处理&&rule.预处理.trim()){let code=rule.预处理.trim();console.log("执行预处理代码:"+code);if(code.startsWith("js:")){code=code.replace("js:","")}try{eval(code)}catch(e){console.log("预处理执行失败:"+e.message)}}}let rule={};const VERSION="drpy1 3.9.41beta1 20230328";const 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";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 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";const 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";const RULE_CK="cookie";const CATE_EXCLUDE="首页|留言|APP|下载|资讯|新闻|动态";const TAB_EXCLUDE="猜你|喜欢|APP|下载|剧情|热播";const OCR_RETRY=3;const OCR_API="http://drpy.nokia.press:8028/ocr/drpy/text";if(typeof MY_URL==="undefined"){var MY_URL}var RKEY;var fetch;var print;var log;var rule_fetch_params;var fetch_params;var oheaders;var _pdfh;var _pdfa;var _pd;const DOM_CHECK_ATTR=/(url|src|href|-original|-src|-play|-url)$/;const SELECT_REGEX=/:eq|:lt|:gt|#/g;const SELECT_REGEX_A=/:eq|:lt|:gt/g;if(typeof Object.assign!="function"){Object.assign=function(){var target=arguments[0];for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target}}if(!String.prototype.includes){String.prototype.includes=function(search,start){if(typeof start!=="number"){start=0}if(start+search.length>this.length){return false}else{return this.indexOf(search,start)!==-1}}}if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function(searchElement,fromIndex){if(this==null){throw new TypeError('"this" is null or not defined')}var o=Object(this);var len=o.length>>>0;if(len===0){return false}var n=fromIndex|0;var k=Math.max(n>=0?n:len-Math.abs(n),0);while(k<len){if(o[k]===searchElement){return true}k++}return false}})}if(typeof String.prototype.startsWith!="function"){String.prototype.startsWith=function(prefix){return this.slice(0,prefix.length)===prefix}}if(typeof String.prototype.endsWith!="function"){String.prototype.endsWith=function(suffix){return this.indexOf(suffix,this.length-suffix.length)!==-1}}Object.prototype.myValues=function(obj){if(obj==null){throw new TypeError("Cannot convert undefined or null to object")}var res=[];for(var k in obj){if(obj.hasOwnProperty(k)){res.push(obj[k])}}return res};if(typeof Object.prototype.values!="function"){Object.prototype.values=function(obj){if(obj==null){throw new TypeError("Cannot convert undefined or null to object")}var res=[];for(var k in obj){if(obj.hasOwnProperty(k)){res.push(obj[k])}}return res}}if(typeof Array.prototype.join!="function"){Array.prototype.join=function(emoji){emoji=emoji||"";let self=this;let str="";let i=0;if(!Array.isArray(self)){throw String(self)+"is not Array"}if(self.length===0){return""}if(self.length===1){return String(self[0])}i=1;str=this[0];for(;i<self.length;i++){str+=String(emoji)+String(self[i])}return str}}String.prototype.rstrip=function(chars){let regex=new RegExp(chars+"$");return this.replace(regex,"")};Array.prototype.append=Array.prototype.push;String.prototype.strip=String.prototype.trim;function 是否正版(vipUrl){let flag=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");return flag.test(vipUrl)}function urlDeal(vipUrl){if(!vipUrl){return""}if(!是否正版(vipUrl)){return vipUrl}if(!/miguvideo/.test(vipUrl)){vipUrl=vipUrl.split("#")[0].split("?")[0]}return vipUrl}function setResult(d){if(!Array.isArray(d)){return[]}VODS=[];d.forEach(function(it){let obj={vod_id:it.url||"",vod_name:it.title||"",vod_remarks:it.desc||"",vod_content:it.content||"",vod_pic:it.pic_url||it.img||""};let kLine truncated
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
import cheerio from 'https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/cheerio.min.js';
|
||||
import 'https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/crypto-js.js';
|
||||
import cheerio from 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/cheerio.min.js';
|
||||
import 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/crypto-js.js';
|
||||
|
||||
function init_test(){
|
||||
// console.log(typeof(CryptoJS));
|
||||
@@ -374,7 +374,7 @@ function md5(text) {
|
||||
}
|
||||
|
||||
function getCryptoJS(){
|
||||
// return request('https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/crypto-hiker.js');
|
||||
// return request('https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/crypto-hiker.js');
|
||||
return 'console.log("CryptoJS已装载");'
|
||||
}
|
||||
|
||||
@@ -1867,7 +1867,7 @@ function init(ext) {
|
||||
try {
|
||||
// make shared jsContext happy muban不能import,不然会造成换源继承后变量被篡改
|
||||
if (typeof (globalThis.mubanJs) === 'undefined') {
|
||||
let mubanJs = request('https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/js/模板.js', { 'User-Agent': MOBILE_UA });
|
||||
let mubanJs = request('https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/模板.js', { 'User-Agent': MOBILE_UA });
|
||||
mubanJs = mubanJs.replace('export default', '(function() {return muban;}()) // export default');
|
||||
// console.log(mubanJs);
|
||||
globalThis.mubanJs = mubanJs;
|
||||
|
||||
+7
-7
@@ -3,10 +3,10 @@ import 'assets://js/lib/crypto-js.js';
|
||||
import 模板 from"../js/模板.js"
|
||||
import {gbkTool} from './gbk.js'
|
||||
|
||||
// import cheerio from "https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/cheerio.min.js";
|
||||
// import "https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/crypto-js.js";
|
||||
// import 模板 from"https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/js/模板.js";
|
||||
// import {gbkTool} from 'https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/gbk.js'
|
||||
// import cheerio from "https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/cheerio.min.js";
|
||||
// import "https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/crypto-js.js";
|
||||
// import 模板 from"https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/模板.js";
|
||||
// import {gbkTool} from 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/gbk.js'
|
||||
|
||||
function init_test(){
|
||||
// console.log(typeof(CryptoJS));
|
||||
@@ -416,7 +416,7 @@ function decodeStr(input,encoding){
|
||||
}
|
||||
|
||||
function getCryptoJS(){
|
||||
// return request('https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/libs/crypto-hiker.js');
|
||||
// return request('https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/crypto-hiker.js');
|
||||
return 'console.log("CryptoJS已装载");'
|
||||
}
|
||||
|
||||
@@ -1456,7 +1456,7 @@ function categoryParse(cateObj) {
|
||||
pagecount = parseInt(rule.pagecount[MY_CATE]);
|
||||
}
|
||||
let nodata = {
|
||||
list:[{vod_name:'无数据,防无限请求',vod_id:'no_data',vod_remarks:'不要点,会崩的',vod_pic:'https://ghproxy.com/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg'}],
|
||||
list:[{vod_name:'无数据,防无限请求',vod_id:'no_data',vod_remarks:'不要点,会崩的',vod_pic:'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg'}],
|
||||
total:1,pagecount:1,page:1,limit:1
|
||||
};
|
||||
let vod = d.length<1?JSON.stringify(nodata):JSON.stringify({
|
||||
@@ -1977,7 +1977,7 @@ function init(ext) {
|
||||
try {
|
||||
// make shared jsContext happy muban不能import,不然会造成换源继承后变量被篡改
|
||||
// if (typeof (globalThis.mubanJs) === 'undefined') {
|
||||
// let mubanJs = request('https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/js/模板.js', { 'User-Agent': MOBILE_UA });
|
||||
// let mubanJs = request('https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/模板.js', { 'User-Agent': MOBILE_UA });
|
||||
// mubanJs = mubanJs.replace('export default', '(function() {return muban;}()) // export default');
|
||||
// // console.log(mubanJs);
|
||||
// globalThis.mubanJs = mubanJs;
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
import cheerio from"assets://js/lib/cheerio.min.js";import"assets://js/lib/crypto-js.js";import 模板 from"../js/模板.js";import{gbkTool}from"./gbk.js";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(typeof rule.预处理==="string"&&rule.预处理&&rule.预处理.trim()){let code=rule.预处理.trim();console.log("执行预处理代码:"+code);if(code.startsWith("js:")){code=code.replace("js:","")}try{eval(code)}catch(e){console.log("预处理执行失败:"+e.message)}}}let rule={};let vercode=typeof pdfl==="function"?"drpy2.1":"drpy2";const VERSION=vercode+" 3.9.41beta1 20230328";const 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";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 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";const 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";const RULE_CK="cookie";const CATE_EXCLUDE="首页|留言|APP|下载|资讯|新闻|动态";const TAB_EXCLUDE="猜你|喜欢|APP|下载|剧情|热播";const OCR_RETRY=3;const OCR_API="http://drpy.nokia.press:8028/ocr/drpy/text";if(typeof MY_URL==="undefined"){var MY_URL}var RKEY;var fetch;var print;var log;var rule_fetch_params;var fetch_params;var oheaders;var _pdfh;var _pdfa;var _pd;const DOM_CHECK_ATTR=/(url|src|href|-original|-src|-play|-url)$/;const NOADD_INDEX=/:eq|:lt|:gt|:first|:last|^body$|^#/;const URLJOIN_ATTR=/(url|src|href|-original|-src|-play|-url)$/;const SELECT_REGEX=/:eq|:lt|:gt|#/g;const SELECT_REGEX_A=/:eq|:lt|:gt/g;if(typeof Object.assign!="function"){Object.assign=function(){var target=arguments[0];for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target}}if(!String.prototype.includes){String.prototype.includes=function(search,start){if(typeof start!=="number"){start=0}if(start+search.length>this.length){return false}else{return this.indexOf(search,start)!==-1}}}if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function(searchElement,fromIndex){if(this==null){throw new TypeError('"this" is null or not defined')}var o=Object(this);var len=o.length>>>0;if(len===0){return false}var n=fromIndex|0;var k=Math.max(n>=0?n:len-Math.abs(n),0);while(k<len){if(o[k]===searchElement){return true}k++}return false}})}if(typeof String.prototype.startsWith!="function"){String.prototype.startsWith=function(prefix){return this.slice(0,prefix.length)===prefix}}if(typeof String.prototype.endsWith!="function"){String.prototype.endsWith=function(suffix){return this.indexOf(suffix,this.length-suffix.length)!==-1}}Object.prototype.myValues=function(obj){if(obj==null){throw new TypeError("Cannot convert undefined or null to object")}var res=[];for(var k in obj){if(obj.hasOwnProperty(k)){res.push(obj[k])}}return res};if(typeof Object.prototype.values!="function"){Object.prototype.values=function(obj){if(obj==null){throw new TypeError("Cannot convert undefined or null to object")}var res=[];for(var k in obj){if(obj.hasOwnProperty(k)){res.push(obj[k])}}return res}}if(typeof Array.prototype.join!="function"){Array.prototype.join=function(emoji){emoji=emoji||"";let self=this;let str="";let i=0;if(!Array.isArray(self)){throw String(self)+"is not Array"}if(self.length===0){return""}if(self.length===1){return String(self[0])}i=1;str=this[0];for(;i<self.length;i++){str+=String(emoji)+String(self[i])}return str}}String.prototype.rstrip=function(chars){let regex=new RegExp(chars+"$");return this.replace(regex,"")};Array.prototype.append=Array.prototype.push;String.prototype.strip=String.prototype.trim;function 是否正版(vipUrl){let flag=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");return flag.test(vipUrl)}function urlDeal(vipUrl){if(!vipUrl){return""}if(!是否正版(vipUrl)){return vipUrl}if(!/miguvideo/.test(vipUrl)){vipUrl=vipUrl.split("#")[0].split("?")[0]}return vipUrl}function setResult(d){if(!Array.isArray(d)){return[]}VODS=[];d.forEach(function(it){let obj={vod_id:it.url||"",vod_name:it.title||"",vod_remarks:it.desc||"",vod_content:it.content||"",vod_pic:it.pic_url||it.img||""};let keys=Object.keys(it);if(keys.includes("tname")){obj.type_name=it.tname||""}if(keys.includes("tid")){obj.type_id=it.tid||""}if(keys.includes("year")){obj.vod_year=it.year||""}if(keys.iLine truncated
|
||||
import cheerio from"assets://js/lib/cheerio.min.js";import"assets://js/lib/crypto-js.js";import 模板 from"../js/模板.js";import{gbkTool}from"./gbk.js";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(typeof rule.预处理==="string"&&rule.预处理&&rule.预处理.trim()){let code=rule.预处理.trim();console.log("执行预处理代码:"+code);if(code.startsWith("js:")){code=code.replace("js:","")}try{eval(code)}catch(e){console.log("预处理执行失败:"+e.message)}}}let rule={};let vercode=typeof pdfl==="function"?"drpy2.1":"drpy2";const VERSION=vercode+" 3.9.41beta1 20230328";const 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";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 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";const 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";const RULE_CK="cookie";const CATE_EXCLUDE="首页|留言|APP|下载|资讯|新闻|动态";const TAB_EXCLUDE="猜你|喜欢|APP|下载|剧情|热播";const OCR_RETRY=3;const OCR_API="http://drpy.nokia.press:8028/ocr/drpy/text";if(typeof MY_URL==="undefined"){var MY_URL}var RKEY;var fetch;var print;var log;var rule_fetch_params;var fetch_params;var oheaders;var _pdfh;var _pdfa;var _pd;const DOM_CHECK_ATTR=/(url|src|href|-original|-src|-play|-url)$/;const NOADD_INDEX=/:eq|:lt|:gt|:first|:last|^body$|^#/;const URLJOIN_ATTR=/(url|src|href|-original|-src|-play|-url)$/;const SELECT_REGEX=/:eq|:lt|:gt|#/g;const SELECT_REGEX_A=/:eq|:lt|:gt/g;if(typeof Object.assign!="function"){Object.assign=function(){var target=arguments[0];for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target}}if(!String.prototype.includes){String.prototype.includes=function(search,start){if(typeof start!=="number"){start=0}if(start+search.length>this.length){return false}else{return this.indexOf(search,start)!==-1}}}if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function(searchElement,fromIndex){if(this==null){throw new TypeError('"this" is null or not defined')}var o=Object(this);var len=o.length>>>0;if(len===0){return false}var n=fromIndex|0;var k=Math.max(n>=0?n:len-Math.abs(n),0);while(k<len){if(o[k]===searchElement){return true}k++}return false}})}if(typeof String.prototype.startsWith!="function"){String.prototype.startsWith=function(prefix){return this.slice(0,prefix.length)===prefix}}if(typeof String.prototype.endsWith!="function"){String.prototype.endsWith=function(suffix){return this.indexOf(suffix,this.length-suffix.length)!==-1}}Object.prototype.myValues=function(obj){if(obj==null){throw new TypeError("Cannot convert undefined or null to object")}var res=[];for(var k in obj){if(obj.hasOwnProperty(k)){res.push(obj[k])}}return res};if(typeof Object.prototype.values!="function"){Object.prototype.values=function(obj){if(obj==null){throw new TypeError("Cannot convert undefined or null to object")}var res=[];for(var k in obj){if(obj.hasOwnProperty(k)){res.push(obj[k])}}return res}}if(typeof Array.prototype.join!="function"){Array.prototype.join=function(emoji){emoji=emoji||"";let self=this;let str="";let i=0;if(!Array.isArray(self)){throw String(self)+"is not Array"}if(self.length===0){return""}if(self.length===1){return String(self[0])}i=1;str=this[0];for(;i<self.length;i++){str+=String(emoji)+String(self[i])}return str}}String.prototype.rstrip=function(chars){let regex=new RegExp(chars+"$");return this.replace(regex,"")};Array.prototype.append=Array.prototype.push;String.prototype.strip=String.prototype.trim;function 是否正版(vipUrl){let flag=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");return flag.test(vipUrl)}function urlDeal(vipUrl){if(!vipUrl){return""}if(!是否正版(vipUrl)){return vipUrl}if(!/miguvideo/.test(vipUrl)){vipUrl=vipUrl.split("#")[0].split("?")[0]}return vipUrl}function setResult(d){if(!Array.isArray(d)){return[]}VODS=[];d.forEach(function(it){let obj={vod_id:it.url||"",vod_name:it.title||"",vod_remarks:it.desc||"",vod_content:it.content||"",vod_pic:it.pic_url||it.img||""};let keys=Object.keys(it);if(keys.includes("tname")){obj.type_name=it.tname||""}if(keys.includes("tid")){obj.type_id=it.tid||""}if(keys.includes("year")){obj.vod_year=it.year||""}if(keys.iLine truncated
|
||||
Reference in new issue
Block a user