Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
言程序plus
dr_py
提交
e8c8368f
dr_py
项目概览
言程序plus
/
dr_py
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
dr_py
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
e8c8368f
编写于
11月 29, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
模板引入方式大改
上级
55eac534
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
32 addition
and
21 deletion
+32
-21
base/rules.db
base/rules.db
+0
-0
js/rules.py
js/rules.py
+4
-2
js/version.txt
js/version.txt
+1
-1
js/模板.js
js/模板.js
+0
-0
libs/drpy.js
libs/drpy.js
+10
-8
libs/drpy.min.js
libs/drpy.min.js
+1
-1
libs/drpy2.js
libs/drpy2.js
+15
-8
libs/drpy2.min.js
libs/drpy2.min.js
+1
-1
未找到文件。
base/rules.db
浏览文件 @
e8c8368f
无法预览此类型文件
js/rules.py
浏览文件 @
e8c8368f
...
...
@@ -43,7 +43,8 @@ def getRulesJs2py(path='cache',js_mode=0):
rule_list
=
[
file
.
replace
(
'.js'
,
''
)
for
file
in
file_name
]
js_path
=
[
f
'
{
path
}
/
{
rule
}
.js'
for
rule
in
rule_list
]
with
open
(
'js/模板.js'
,
encoding
=
'utf-8'
)
as
f
:
before
=
f
.
read
().
split
(
'export'
)[
0
]
# before = f.read().split('export')[0]
before
=
f
.
read
().
split
(
'export default'
)[
0
]
rule_codes
=
[]
# for js in js_path:
# with open(js,encoding='utf-8') as f:
...
...
@@ -105,7 +106,8 @@ def getRules(path='cache',js_mode=0):
rule_list
=
[
file
.
replace
(
'.js'
,
''
)
for
file
in
file_name
]
js_path
=
[
f
'
{
path
}
/
{
rule
}
.js'
for
rule
in
rule_list
]
with
open
(
'js/模板.js'
,
encoding
=
'utf-8'
)
as
f
:
before
=
f
.
read
().
split
(
'export'
)[
0
]
# before = f.read().split('export')[0]
before
=
f
.
read
().
split
(
'export default'
)[
0
]
rule_codes
=
[]
ctx
=
Context
()
codes
=
[]
...
...
js/version.txt
浏览文件 @
e8c8368f
3.9.26beta2
\ No newline at end of file
3.9.27
\ No newline at end of file
js/模板.js
浏览文件 @
e8c8368f
此差异已折叠。
点击以展开。
libs/drpy.js
浏览文件 @
e8c8368f
...
...
@@ -5,6 +5,7 @@ import cheerio from 'https://gitcode.net/qq_32394351/dr_py/-/raw/master/libs/che
// import cheerio from 'http://192.168.10.103:5705/libs/cheerio.min.js';
import
'
https://gitcode.net/qq_32394351/dr_py/-/raw/master/libs/crypto-js.js
'
;
import
'
https://gitcode.net/qq_32394351/dr_py/-/raw/master/libs/drT.js
'
;
import
模板
from
'
https://gitcode.net/qq_32394351/dr_py/-/raw/master/js/模板.js
'
;
// import 'http://192.168.10.103:5705/libs/drT.js';
// import muban from 'https://gitcode.net/qq_32394351/dr_py/-/raw/master/js/模板.js';
// import muban from 'http://192.168.10.103:5705/admin/view/模板.js';
...
...
@@ -53,7 +54,7 @@ function pre(){
}
let
rule
=
{};
const
VERSION
=
'
drpy1 3.9.2
5beta1 20221126
'
;
const
VERSION
=
'
drpy1 3.9.2
7 20221129
'
;
/** 已知问题记录
* 1.影魔的jinjia2引擎不支持 {{fl}}对象直接渲染 (有能力解决的话尽量解决下,支持对象直接渲染字符串转义,如果加了|safe就不转义)[影魔牛逼,最新的文件发现这问题已经解决了]
* Array.prototype.append = Array.prototype.push; 这种js执行后有毛病,for in 循环列表会把属性给打印出来 (这个大毛病需要重点排除一下)
...
...
@@ -2037,13 +2038,14 @@ function playParse(playObj){
console
.
log
(
'
init
'
);
try
{
// make shared jsContext happy muban不能import,不然会造成换源继承后变量被篡改
if
(
typeof
(
globalThis
.
mubanJs
)
===
'
undefined
'
)
{
let
mubanJs
=
request
(
'
https://gitcode.net/qq_32394351/dr_py/-/raw/master/js/模板.js
'
,
{
'
User-Agent
'
:
MOBILE_UA
});
mubanJs
=
mubanJs
.
replace
(
'
export default
'
,
'
(function() {return muban;}()) // export default
'
);
// console.log(mubanJs);
globalThis
.
mubanJs
=
mubanJs
;
}
let
muban
=
eval
(
globalThis
.
mubanJs
);
// if (typeof (globalThis.mubanJs) === 'undefined') {
// let mubanJs = request('https://gitcode.net/qq_32394351/dr_py/-/raw/master/js/模板.js', { 'User-Agent': MOBILE_UA });
// mubanJs = mubanJs.replace('export default', '(function() {return muban;}()) // export default');
// // console.log(mubanJs);
// globalThis.mubanJs = mubanJs;
// }
// let muban = eval(globalThis.mubanJs);
let
muban
=
模板
.
getMubans
();
if
(
typeof
ext
==
'
object
'
){
rule
=
ext
;
}
else
if
(
typeof
ext
==
'
string
'
)
{
...
...
libs/drpy.min.js
浏览文件 @
e8c8368f
此差异已折叠。
点击以展开。
libs/drpy2.js
浏览文件 @
e8c8368f
import
cheerio
from
'
https://gitcode.net/qq_32394351/dr_py/-/raw/master/libs/cheerio.min.js
'
;
import
'
https://gitcode.net/qq_32394351/dr_py/-/raw/master/libs/crypto-js.js
'
;
import
模板
from
'
https://gitcode.net/qq_32394351/dr_py/-/raw/master/js/模板.js
'
;
function
init_test
(){
// console.log(typeof(CryptoJS));
console
.
log
(
"
init_test_start
"
);
// print(模板);
// print(typeof(模板.getMubans));
console
.
log
(
"
当前版本号:
"
+
VERSION
);
console
.
log
(
RKEY
);
console
.
log
(
JSON
.
stringify
(
rule
));
...
...
@@ -31,7 +34,7 @@ function pre(){
}
let
rule
=
{};
const
VERSION
=
'
drpy2 3.9.2
5beta1 20221126
'
;
const
VERSION
=
'
drpy2 3.9.2
7 20221129
'
;
/** 已知问题记录
* 1.影魔的jinjia2引擎不支持 {{fl}}对象直接渲染 (有能力解决的话尽量解决下,支持对象直接渲染字符串转义,如果加了|safe就不转义)[影魔牛逼,最新的文件发现这问题已经解决了]
* Array.prototype.append = Array.prototype.push; 这种js执行后有毛病,for in 循环列表会把属性给打印出来 (这个大毛病需要重点排除一下)
...
...
@@ -1902,13 +1905,17 @@ function init(ext) {
console
.
log
(
'
init
'
);
try
{
// make shared jsContext happy muban不能import,不然会造成换源继承后变量被篡改
if
(
typeof
(
globalThis
.
mubanJs
)
===
'
undefined
'
)
{
let
mubanJs
=
request
(
'
https://gitcode.net/qq_32394351/dr_py/-/raw/master/js/模板.js
'
,
{
'
User-Agent
'
:
MOBILE_UA
});
mubanJs
=
mubanJs
.
replace
(
'
export default
'
,
'
(function() {return muban;}()) // export default
'
);
// console.log(mubanJs);
globalThis
.
mubanJs
=
mubanJs
;
}
let
muban
=
eval
(
globalThis
.
mubanJs
);
// if (typeof (globalThis.mubanJs) === 'undefined') {
// let mubanJs = request('https://gitcode.net/qq_32394351/dr_py/-/raw/master/js/模板.js', { 'User-Agent': MOBILE_UA });
// mubanJs = mubanJs.replace('export default', '(function() {return muban;}()) // export default');
// // console.log(mubanJs);
// globalThis.mubanJs = mubanJs;
// }
// let muban = eval(globalThis.mubanJs);
let
muban
=
模板
.
getMubans
();
// print(typeof (muban));
// print(muban);
if
(
typeof
ext
==
'
object
'
){
rule
=
ext
;
}
else
if
(
typeof
ext
==
'
string
'
)
{
...
...
libs/drpy2.min.js
浏览文件 @
e8c8368f
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录