Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
peater12
dr_py
提交
946ac958
dr_py
项目概览
peater12
/
dr_py
落后 Fork 源项目 2 个版本
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,发现更多精彩内容 >>
提交
946ac958
编写于
10月 15, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复drpy二级重定代码的兼容性(小强迷已正常)
上级
dc85ec77
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
34 addition
and
7 deletion
+34
-7
base/rules.db
base/rules.db
+0
-0
js/version.txt
js/version.txt
+1
-1
js/小强迷.js
js/小强迷.js
+1
-1
libs/drpy.js
libs/drpy.js
+31
-4
libs/drpy.min.js
libs/drpy.min.js
+1
-1
未找到文件。
base/rules.db
浏览文件 @
946ac958
无法预览此类型文件
js/version.txt
浏览文件 @
946ac958
3.9.7beta4
\ No newline at end of file
3.9.7beta5
\ No newline at end of file
js/小强迷.js
浏览文件 @
946ac958
muban
.
首图2
.
二级
.
content
=
'
.stui-content__desc&&Text
'
;
muban
.
首图2
.
二级
.
title
=
'
.stui-content__detail&&h3&&Text;.stui-content__detail&&p:eq(1)&&Text;
'
;
muban
.
首图2
.
二级
.
重定向
=
'
js:let url = jsp.pd(html,".playbtn&&a&&href");log(url);html = request(url)
'
;
muban
.
首图2
.
二级
.
重定向
=
'
js:let url = jsp.pd(html,".playbtn&&a&&href");log(
"重定向到:"+
url);html = request(url)
'
;
muban
.
首图2
.
二级
.
tabs
=
'
.t-ul&&li
'
;
muban
.
首图2
.
二级
.
lists
=
'
.stui-content__playlist:eq(#id)&&li
'
;
...
...
libs/drpy.js
浏览文件 @
946ac958
...
...
@@ -440,7 +440,15 @@ const defaultParser = {
* @returns {string|*}
*/
function
pdfh2
(
html
,
parse
){
let
result
=
defaultParser
.
pdfh
(
html
,
parse
);
let
html2
=
html
;
try
{
if
(
typeof
(
html
)
!==
'
string
'
){
html2
=
html
.
rr
(
html
.
ele
).
toString
();
}
}
catch
(
e
)
{
print
(
'
html对象转文本发生了错误:
'
+
e
.
message
);
}
let
result
=
defaultParser
.
pdfh
(
html2
,
parse
);
let
option
=
parse
.
includes
(
'
&&
'
)?
parse
.
split
(
'
&&
'
).
slice
(
-
1
)[
0
]:
parse
.
split
(
'
'
).
slice
(
-
1
)[
0
];
if
(
/style/
.
test
(
option
.
toLowerCase
())
&&
/url
\(
/
.
test
(
result
)){
try
{
...
...
@@ -450,6 +458,24 @@ function pdfh2(html,parse){
return
result
}
/**
* pdfa原版优化,可以转换jq的html对象
* @param html
* @param parse
* @returns {*}
*/
function
pdfa2
(
html
,
parse
){
let
html2
=
html
;
try
{
if
(
typeof
(
html
)
!==
'
string
'
){
html2
=
html
.
rr
(
html
.
ele
).
toString
();
}
}
catch
(
e
)
{
print
(
'
html对象转文本发生了错误:
'
+
e
.
message
);
}
return
defaultParser
.
pdfa
(
html2
,
parse
);
}
/**
* pd原版方法重写-增加自动urljoin
* @param html
...
...
@@ -477,7 +503,7 @@ function pd2(html,parse,uri){
const
parseTags
=
{
jsp
:{
pdfh
:
pdfh2
,
pdfa
:
defaultParser
.
pdfa
,
pdfa
:
pdfa2
,
pd
:
pd2
,
},
json
:{
...
...
@@ -1456,6 +1482,7 @@ function detailParse(detailObj){
let
vod_play_from
=
'
$$$
'
;
let
playFrom
=
[];
if
(
p
.
重定向
&&
p
.
重定向
.
startsWith
(
'
js:
'
)){
print
(
'
开始执行重定向代码:
'
+
p
.
重定向
);
html
=
eval
(
p
.
重定向
.
replace
(
'
js:
'
,
''
));
if
(
_impJQP
)
{
let
c$
=
cheerio
.
load
(
html
);
...
...
@@ -1471,7 +1498,7 @@ function detailParse(detailObj){
console
.
log
(
vHeader
.
length
);
for
(
let
v
of
vHeader
){
let
v_title
=
_pdfh
(
v
,
'
body&&Text
'
);
let
v_title
=
_pdfh
(
v
,
'
body&&Text
'
)
.
trim
()
;
console
.
log
(
v_title
);
if
(
tab_exclude
&&
(
new
RegExp
(
tab_exclude
)).
test
(
v_title
)){
continue
;
...
...
@@ -1510,7 +1537,7 @@ function detailParse(detailObj){
// 请注意,这里要固定pdfh解析body&&Text,不需要下划线,没写错
// new_vod_list.push(pdfh(it,'body&&Text')+'$'+_pd(it,'a&&href',MY_URL));
// new_vod_list.push(cheerio.load(it).text()+'$'+_pd(it,'a&&href',MY_URL));
new_vod_list
.
push
(
_pdfh
(
it
,
'
body&&Text
'
)
+
'
$
'
+
_pd
(
it
,
'
a&&href
'
,
MY_URL
));
new_vod_list
.
push
(
_pdfh
(
it
,
'
body&&Text
'
)
.
trim
()
+
'
$
'
+
_pd
(
it
,
'
a&&href
'
,
MY_URL
));
});
let
vlist
=
new_vod_list
.
join
(
'
#
'
);
vod_tab_list
.
push
(
vlist
);
...
...
libs/drpy.min.js
浏览文件 @
946ac958
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录