drpy2.js和drpy.js增加测试性属性 hostJs,可以执行js代码动态获取站源网址。js0暂未支持
This commit is contained in:
parent
4a8cd1e49b
commit
d668f49e6c
@ -1 +1 @@
|
||||
3.9.42beta26
|
||||
3.9.42beta27
|
||||
10
libs/drpy.js
10
libs/drpy.js
@ -97,6 +97,7 @@ const OCR_API = 'http://drpy.nokia.press:8028/ocr/drpy/text';//ocr在线识别
|
||||
if(typeof(MY_URL)==='undefined'){
|
||||
var MY_URL; // 全局注入变量,pd函数需要
|
||||
}
|
||||
var HOST;
|
||||
var RKEY; // 源的唯一标识
|
||||
var fetch;
|
||||
var print;
|
||||
@ -2145,6 +2146,15 @@ function playParse(playObj){
|
||||
rule.cate_exclude = rule_cate_excludes.join('|');
|
||||
rule.tab_exclude = rule_tab_excludes.join('|');
|
||||
rule.host = (rule.host||'').rstrip('/');
|
||||
HOST = rule.host;
|
||||
if(rule.hostJs){
|
||||
try {
|
||||
eval(rule.hostJs);
|
||||
rule.host = HOST.rstrip('/');
|
||||
}catch (e) {
|
||||
console.log(`执行${rule.hostJs}获取host发生错误:`+e.message);
|
||||
}
|
||||
}
|
||||
rule.url = rule.url||'';
|
||||
rule.double = rule.double||false;
|
||||
rule.homeUrl = rule.homeUrl||'';
|
||||
|
||||
2
libs/drpy.min.js
vendored
2
libs/drpy.min.js
vendored
File diff suppressed because one or more lines are too long
@ -84,6 +84,7 @@ const OCR_API = 'http://drpy.nokia.press:8028/ocr/drpy/text';//ocr在线识别
|
||||
if(typeof(MY_URL)==='undefined'){
|
||||
var MY_URL; // 全局注入变量,pd函数需要
|
||||
}
|
||||
var HOST;
|
||||
var RKEY; // 源的唯一标识
|
||||
var fetch;
|
||||
var print;
|
||||
@ -2012,6 +2013,15 @@ function init(ext) {
|
||||
rule.cate_exclude = rule_cate_excludes.join('|');
|
||||
rule.tab_exclude = rule_tab_excludes.join('|');
|
||||
rule.host = (rule.host||'').rstrip('/');
|
||||
HOST = rule.host;
|
||||
if(rule.hostJs){
|
||||
try {
|
||||
eval(rule.hostJs);
|
||||
rule.host = HOST.rstrip('/');
|
||||
}catch (e) {
|
||||
console.log(`执行${rule.hostJs}获取host发生错误:`+e.message);
|
||||
}
|
||||
}
|
||||
rule.url = rule.url||'';
|
||||
rule.double = rule.double||false;
|
||||
rule.homeUrl = rule.homeUrl||'';
|
||||
|
||||
2
libs/drpy2.min.js
vendored
2
libs/drpy2.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user