Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
言程序plus
dr_py
提交
355bbf1f
dr_py
项目概览
言程序plus
/
dr_py
与 Fork 源项目一致
Fork自
晚风拂柳颜 / dr_py
通知
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
355bbf1f
编写于
8月 30, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复蓝莓多多解析
上级
c7709cce
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
41 addition
and
17 deletion
+41
-17
classes/cms.py
classes/cms.py
+3
-2
js/蓝莓影视.js
js/蓝莓影视.js
+1
-1
py/蓝莓.js
py/蓝莓.js
+13
-10
utils/encode.py
utils/encode.py
+24
-4
未找到文件。
classes/cms.py
浏览文件 @
355bbf1f
...
...
@@ -11,7 +11,7 @@ from utils.web import *
from
models
import
*
from
utils.config
import
config
from
utils.log
import
logger
from
utils.encode
import
base64Encode
,
baseDecode
,
fetch
,
post
,
request
,
getCryptoJS
,
getPreJs
from
utils.encode
import
base64Encode
,
baseDecode
,
fetch
,
post
,
request
,
getCryptoJS
,
getPreJs
,
buildUrl
from
utils.safePython
import
safePython
from
utils.parser
import
runPy
,
runJScode
from
utils.htmlParser
import
jsoup
...
...
@@ -22,7 +22,8 @@ from easydict import EasyDict as edict
py_ctx
=
{
'requests'
:
requests
,
'print'
:
print
,
'base64Encode'
:
base64Encode
,
'baseDecode'
:
baseDecode
,
'log'
:
logger
.
info
,
'fetch'
:
fetch
,
'post'
:
post
,
'request'
:
request
,
'getCryptoJS'
:
getCryptoJS
'log'
:
logger
.
info
,
'fetch'
:
fetch
,
'post'
:
post
,
'request'
:
request
,
'getCryptoJS'
:
getCryptoJS
,
'buildUrl'
:
buildUrl
}
# print(getCryptoJS())
...
...
js/蓝莓影视.js
浏览文件 @
355bbf1f
...
...
@@ -12,7 +12,7 @@ var rule = {
class_parse
:
'
.navbar-items li:gt(1):lt(8);a&&Text;a&&href;/(
\\
d+).html
'
,
play_parse
:
true
,
//一般有免嗅才开,没免嗅还开只能服务器打印日志进行监听并重定向
// lazy:'通用免嗅',
lazy
:
'
js:var MY_HOME="http://lanmeiguojiang.com:5244/d/%E8%93%9D%E8%8E%93%E4%BA%91%E7%9B%98";let
fetch_params={headers:d.headers,timeout:d.timeout,encoding:d.encoding};let html=fetch(input,fetch_params);var player=JSON.parse(html.match(/r player_.*?=(.*?)</)[1]);var jsurl=player.url;var from=player.from;if(player.encrypt=="1"){var jsurl=unescape(jsurl)}else if(player.encrypt=="2"){var jsurl=unescape(base64Decode(jsurl))}else{jsurl}eval(getCryptoJS());if(/ddzy|duoduo/.test(from)){eval(fetch(MY_HOME+"/pzwj.js",fetch_params));var jx=MacPlayerConfig.player_list[from].parse;eval(request(jx+jsurl,{headers:{Referer:input}}).match(/var config = {[
\\
s
\\
S]*?}/)[0]);jx=jx.replace("?url=","");eval(request(jx+"js/decode.js"));jxk=request(jx+"js/setting.js").split(",");jx+="555tZ4pvzHE3BpiO838.php";config.tm=(new Date).getTime();config.sign="F4penExTGogdt6U8";input=getVideoInfo(JSON.parse(fetch(buildUrl(jx,config)
)).url)}else{let jxurl="https://lanmeiguojiang.com/dd/?url="+jsurl;input=maoss(jxurl,jxurl,"A42EAC0C2B408472")}
'
,
lazy
:
'
js:var MY_HOME="http://lanmeiguojiang.com:5244/d/%E8%93%9D%E8%8E%93%E4%BA%91%E7%9B%98";let
headers=d.headers;headers["Referer"]=input;let fetch_params={headers:headers,timeout:d.timeout,encoding:d.encoding};let html=fetch(input,fetch_params);var player=JSON.parse(html.match(/r player_.*?=(.*?)</)[1]);var jsurl=player.url;var from=player.from;if(player.encrypt=="1"){var jsurl=unescape(jsurl)}else if(player.encrypt=="2"){var jsurl=unescape(base64Decode(jsurl))}else{jsurl}eval(getCryptoJS());if(/ddzy|duoduo/.test(from)){let html=request(MY_HOME+"/pzwj.js");eval(html);var jx=MacPlayerConfig.player_list[from].parse;print("第1次多多解析:",jx);eval(fetch(jx+jsurl,fetch_params).match(/var config = {[
\\
s
\\
S]*?}/)[0]);jx=jx.replace("?url=","");eval(fetch(jx+"js/decode.js",fetch_params));jxk=fetch(jx+"js/setting.js",fetch_params).split(",");jx+="555tZ4pvzHE3BpiO838.php";print("第2次多多解析:",jx);config.tm=(new Date).getTime();config.sign="F4penExTGogdt6U8";input=getVideoInfo(JSON.parse(fetch(buildUrl(jx,config),fetch_params
)).url)}else{let jxurl="https://lanmeiguojiang.com/dd/?url="+jsurl;input=maoss(jxurl,jxurl,"A42EAC0C2B408472")}
'
,
limit
:
30
,
推荐
:
'
.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href
'
,
double
:
true
,
// 推荐内容是否双层定位
...
...
py/蓝莓.js
浏览文件 @
355bbf1f
js
:
var
MY_HOME
=
'
http://lanmeiguojiang.com:5244/d/%E8%93%9D%E8%8E%93%E4%BA%91%E7%9B%98
'
;
let
fetch_params
=
{
headers
:
d
.
headers
,
timeout
:
d
.
timeout
,
encoding
:
d
.
encoding
};
let
headers
=
d
.
headers
;
headers
[
'
Referer
'
]
=
input
;
let
fetch_params
=
{
headers
:
headers
,
timeout
:
d
.
timeout
,
encoding
:
d
.
encoding
};
let
html
=
fetch
(
input
,
fetch_params
);
var
player
=
JSON
.
parse
(
html
.
match
(
/r player_.*
?
=
(
.*
?)
</
)[
1
]);
var
jsurl
=
player
.
url
;
...
...
@@ -14,20 +16,21 @@ if (player.encrypt == '1') {
}
eval
(
getCryptoJS
());
if
(
/ddzy|duoduo/
.
test
(
from
))
{
eval
(
fetch
(
MY_HOME
+
'
/pzwj.js
'
,
fetch_params
));
let
html
=
request
(
MY_HOME
+
'
/pzwj.js
'
);
// print(html);
eval
(
html
);
// print('好了');
var
jx
=
MacPlayerConfig
.
player_list
[
from
].
parse
;
eval
(
request
(
jx
+
jsurl
,
{
headers
:
{
'
Referer
'
:
input
}
}).
match
(
/var config = {
[\s\S]
*
?
}/
)[
0
]);
print
(
'
第1次多多解析:
'
,
jx
);
eval
(
fetch
(
jx
+
jsurl
,
fetch_params
).
match
(
/var config = {
[\s\S]
*
?
}/
)[
0
]);
jx
=
jx
.
replace
(
'
?url=
'
,
''
);
eval
(
request
(
jx
+
'
js/decode.js
'
));
jxk
=
request
(
jx
+
'
js/setting.js
'
).
split
(
'
,
'
);
eval
(
fetch
(
jx
+
'
js/decode.js
'
,
fetch_params
));
jxk
=
fetch
(
jx
+
'
js/setting.js
'
,
fetch_params
).
split
(
'
,
'
);
jx
+=
'
555tZ4pvzHE3BpiO838.php
'
;
//eval(jxk[32])
print
(
'
第2次多多解析:
'
,
jx
);
config
.
tm
=
new
Date
().
getTime
();
config
.
sign
=
'
F4penExTGogdt6U8
'
;
//eval(jxk[36])
input
=
getVideoInfo
(
JSON
.
parse
(
fetch
(
buildUrl
(
jx
,
config
))).
url
);
input
=
getVideoInfo
(
JSON
.
parse
(
fetch
(
buildUrl
(
jx
,
config
)
,
fetch_params
)).
url
);
}
else
{
let
jxurl
=
"
https://lanmeiguojiang.com/dd/?url=
"
+
jsurl
;
input
=
maoss
(
jxurl
,
jxurl
,
"
A42EAC0C2B408472
"
);
...
...
utils/encode.py
浏览文件 @
355bbf1f
...
...
@@ -7,7 +7,7 @@
import
base64
import
requests
import
os
from
utils.web
import
UC_UA
from
utils.web
import
UC_UA
,
PC_UA
def
getPreJs
():
base_path
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
)))
# 上级目
...
...
@@ -33,7 +33,9 @@ def base64Encode(text):
def
baseDecode
(
text
):
return
base64
.
b64decode
(
text
).
decode
(
"utf-8"
)
#base64解码
def
dealObj
(
obj
):
def
dealObj
(
obj
=
None
):
if
not
obj
:
obj
=
{}
encoding
=
obj
.
get
(
'encoding'
)
or
'utf-8'
encoding
=
str
(
encoding
).
replace
(
"'"
,
""
)
# print(type(url),url)
...
...
@@ -64,6 +66,7 @@ def base_request(url,obj,method=None):
if
not
method
:
method
=
'get'
# print(obj)
print
(
f
'
{
method
}
:
{
url
}
'
)
try
:
# r = requests.get(url, headers=headers, params=body, timeout=timeout)
if
method
.
lower
()
==
'get'
:
...
...
@@ -84,7 +87,9 @@ def fetch(url,obj,method=None):
if
not
method
:
method
=
'get'
obj
=
dealObj
(
obj
)
print
(
method
)
# print(f'{method}:{url}')
if
not
obj
.
get
(
'headers'
)
or
not
obj
[
'headers'
].
get
(
'User-Agent'
):
obj
[
'headers'
][
'User-Agent'
]
=
PC_UA
return
base_request
(
url
,
obj
,
method
)
def
post
(
url
,
obj
):
...
...
@@ -95,7 +100,22 @@ def request(url,obj,method=None):
if
not
method
:
method
=
'get'
obj
=
dealObj
(
obj
)
# print(f'{method}:{url}')
if
not
obj
.
get
(
'headers'
)
or
not
obj
[
'headers'
].
get
(
'User-Agent'
):
obj
[
'headers'
][
'User-Agent'
]
=
UC_UA
return
base_request
(
url
,
obj
,
method
)
\ No newline at end of file
return
base_request
(
url
,
obj
,
method
)
def
buildUrl
(
url
,
obj
=
None
):
url
=
str
(
url
).
replace
(
"'"
,
""
)
if
not
obj
:
obj
=
{}
new_obj
=
{}
for
i
in
obj
:
new_obj
[
str
(
i
).
replace
(
"'"
,
""
)]
=
str
(
obj
[
i
]).
replace
(
"'"
,
""
)
if
not
str
(
url
).
endswith
(
'?'
):
url
=
str
(
url
)
+
'?'
prs
=
'&'
.
join
([
f
'
{
i
}
=
{
obj
[
i
]
}
'
for
i
in
obj
])
url
=
(
url
+
prs
).
replace
(
'"'
,
''
).
replace
(
"'"
,
''
)
# print(url)
return
url
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录