Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taokun401
dr_py
提交
94543b8d
dr_py
项目概览
taokun401
/
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,发现更多精彩内容 >>
提交
94543b8d
编写于
11月 26, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
接口优化,推荐的double也支持第二位写*
上级
0b8a6032
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
84 addition
and
45 deletion
+84
-45
base/rules.db
base/rules.db
+0
-0
controllers/cms.py
controllers/cms.py
+18
-15
js/乐猪TV.js
js/乐猪TV.js
+2
-2
js/酷客影院.js
js/酷客影院.js
+25
-0
libs/drpy.js
libs/drpy.js
+18
-13
libs/drpy.min.js
libs/drpy.min.js
+1
-1
libs/drpy2.js
libs/drpy2.js
+19
-13
libs/drpy2.min.js
libs/drpy2.min.js
+1
-1
未找到文件。
base/rules.db
浏览文件 @
94543b8d
无法预览此类型文件
controllers/cms.py
浏览文件 @
94543b8d
...
...
@@ -572,8 +572,11 @@ class CMS:
jsp
=
jsoup
(
self
.
homeUrl
)
pp
=
self
.
一级
.
split
(
';'
)
def
getPP
(
p
,
pn
,
pp
,
ppn
):
ps
=
pp
[
ppn
]
if
p
[
pn
]
==
'*'
and
len
(
pp
)
>
ppn
else
p
[
pn
]
return
ps
try
:
ps
=
pp
[
ppn
]
if
p
[
pn
]
==
'*'
and
len
(
pp
)
>
ppn
else
p
[
pn
]
return
ps
except
Exception
as
e
:
return
''
p0
=
getPP
(
p
,
0
,
pp
,
0
)
is_json
=
str
(
p0
).
startswith
(
'json:'
)
if
is_json
:
...
...
@@ -582,8 +585,6 @@ class CMS:
pdfa
=
jsp
.
pjfa
if
is_json
else
jsp
.
pdfa
pd
=
jsp
.
pj
if
is_json
else
jsp
.
pd
# print(html)
try
:
if
self
.
double
:
...
...
@@ -591,29 +592,30 @@ class CMS:
# print(p[0])
# print(items)
# print(len(items))
p1
=
getPP
(
p
,
1
,
pp
,
0
)
p2
=
getPP
(
p
,
2
,
pp
,
1
)
p3
=
getPP
(
p
,
3
,
pp
,
2
)
p4
=
getPP
(
p
,
4
,
pp
,
3
)
p5
=
getPP
(
p
,
5
,
pp
,
4
)
p6
=
getPP
(
p
,
6
,
pp
,
5
)
for
item
in
items
:
items2
=
pdfa
(
item
,
p
[
1
]
)
items2
=
pdfa
(
item
,
p
1
)
# print(len(items2))
for
item2
in
items2
:
try
:
p2
=
getPP
(
p
,
2
,
pp
,
1
)
title
=
pdfh
(
item2
,
p2
)
# print(title)
try
:
p3
=
getPP
(
p
,
3
,
pp
,
2
)
img
=
pd
(
item2
,
p3
)
except
:
img
=
''
try
:
p4
=
getPP
(
p
,
4
,
pp
,
3
)
desc
=
pdfh
(
item2
,
p4
)
except
:
desc
=
''
p5
=
getPP
(
p
,
5
,
pp
,
4
)
links
=
[
pd
(
item2
,
_p5
)
if
not
self
.
detailUrl
else
pdfh
(
item2
,
_p5
)
for
_p5
in
p5
.
split
(
'+'
)]
vid
=
'$'
.
join
(
links
)
if
len
(
p
)
>
6
and
p
[
6
]:
p6
=
getPP
(
p
,
6
,
pp
,
5
)
content
=
pdfh
(
item2
,
p6
)
else
:
content
=
''
...
...
@@ -635,26 +637,27 @@ class CMS:
else
:
items
=
pdfa
(
html
,
p0
.
replace
(
'json:'
,
''
))
# print(items)
p1
=
getPP
(
p
,
1
,
pp
,
1
)
p2
=
getPP
(
p
,
2
,
pp
,
2
)
p3
=
getPP
(
p
,
3
,
pp
,
3
)
p4
=
getPP
(
p
,
4
,
pp
,
4
)
p5
=
getPP
(
p
,
5
,
pp
,
5
)
for
item
in
items
:
try
:
p1
=
getPP
(
p
,
1
,
pp
,
1
)
title
=
pdfh
(
item
,
p1
)
try
:
p2
=
getPP
(
p
,
2
,
pp
,
2
)
img
=
pd
(
item
,
p2
)
except
:
img
=
''
try
:
p3
=
getPP
(
p
,
3
,
pp
,
3
)
desc
=
pdfh
(
item
,
p3
)
except
:
desc
=
''
p4
=
getPP
(
p
,
4
,
pp
,
4
)
# link = pd(item, p[4])
links
=
[
pd
(
item
,
_p5
)
if
not
self
.
detailUrl
else
pdfh
(
item
,
_p5
)
for
_p5
in
p4
.
split
(
'+'
)]
vid
=
'$'
.
join
(
links
)
if
len
(
p
)
>
5
and
p
[
5
]:
p5
=
getPP
(
p
,
5
,
pp
,
5
)
content
=
pdfh
(
item
,
p5
)
else
:
content
=
''
...
...
js/乐猪TV.js
浏览文件 @
94543b8d
...
...
@@ -14,10 +14,10 @@ var rule = {
play_parse
:
true
,
lazy
:
''
,
limit
:
5
,
推荐
:
'
ul.tbox_m2;li
;*;*;*;*
'
,
推荐
:
'
.tbox2;*
;*;*;*;*
'
,
double
:
true
,
// 推荐内容是否双层定位
一级
:
'
ul.tbox_m2 li;a&&title;a&&data-original;span&&Text;a&&href
'
,
二级
:{
"
title
"
:
"
.data h4
&&Text
"
,
"
img
"
:
"
.item-lazy&&data-original
"
,
"
desc
"
:
"
.cr3.starLink
&&Text
"
,
"
content
"
:
"
.tbox_js&&Text
"
,
"
tabs
"
:
"
js:pdfa=jsp.pdfa;TABS=pdfa(html,'.tbox_t h3').map(function(it,idex){return '线路'+(idex+1)})
"
,
"
lists
"
:
"
ul.list_block:eq(#id) li
"
},
二级
:{
"
title
"
:
"
.data h4
--i&&Text;.yac&&Text
"
,
"
img
"
:
"
.item-lazy&&data-original
"
,
"
desc
"
:
"
;;;.act&&Text;.dir
&&Text
"
,
"
content
"
:
"
.tbox_js&&Text
"
,
"
tabs
"
:
"
js:pdfa=jsp.pdfa;TABS=pdfa(html,'.tbox_t h3').map(function(it,idex){return '线路'+(idex+1)})
"
,
"
lists
"
:
"
ul.list_block:eq(#id) li
"
},
搜索
:
'
ul.tbox_m li;*;*;*;*
'
,
}
js/酷客影院.js
0 → 100644
浏览文件 @
94543b8d
var
rule
=
{
title
:
'
酷客影院
'
,
host
:
'
http://www.2kuke.com
'
,
// homeUrl:'/',
url
:
'
/list/fyclass_fypage.html
'
,
//searchUrl:'/vodsearch/**----------fypage---.html',
searchable
:
0
,
//是否启用全局搜索,
quickSearch
:
0
,
//是否启用快速搜索,
filterable
:
0
,
//是否启用分类筛选,
headers
:{
//网站的请求头,完整支持所有的,常带ua和cookies
'
User-Agent
'
:
'
MOBILE_UA
'
,
// "Cookie": "searchneed=ok"
},
//class_parse:'.stui-header__menu li.hidden-xs;a&&Text;a&&href;/(\\d+)/',
class_name
:
'
电影&剧集&综艺&动漫&伦理
'
,
class_url
:
'
1&2&4&3&6
'
,
play_parse
:
true
,
lazy
:
''
,
limit
:
8
,
推荐
:
'
.stui-vodlist.clearfix;.stui-vodlist__box;a&&title;a&&data-original;.pic-text&&Text;a&&href
'
,
double
:
true
,
// 推荐内容是否双层定位
一级
:
'
.stui-vodlist.clearfix li;a&&title;a&&data-original;.pic-text&&Text;a&&href
'
,
二级
:{
"
title
"
:
"
h1.line1&&Text;.stui-content__detail p:eq(0)&&Text
"
,
"
img
"
:
"
.lazyload&&data-original
"
,
"
desc
"
:
"
;;;.stui-content__detail p:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text
"
,
"
content
"
:
"
.stui-content__detail p:eq(-1)&&Text
"
,
"
tabs
"
:
"
.nav.nav-tabs.pull-right&&li
"
,
"
lists
"
:
"
.stui-content__playlist:eq(#id) li
"
},
}
libs/drpy.js
浏览文件 @
94543b8d
...
...
@@ -1134,8 +1134,12 @@ function homeParse(homeObj) {
* @returns {*}
*/
function
getPP
(
p
,
pn
,
pp
,
ppn
){
let
ps
=
p
[
pn
]
===
'
*
'
&&
pp
.
length
>
ppn
?
pp
[
ppn
]:
p
[
pn
]
return
ps
try
{
let
ps
=
p
[
pn
]
===
'
*
'
&&
pp
.
length
>
ppn
?
pp
[
ppn
]:
p
[
pn
]
return
ps
}
catch
(
e
)
{
return
''
}
}
/**
...
...
@@ -1193,25 +1197,27 @@ function homeVodParse(homeVodObj){
if
(
homeVodObj
.
double
)
{
let
items
=
_pdfa
(
html
,
p0
);
// console.log(items.length);
let
p1
=
getPP
(
p
,
1
,
pp
,
0
);
let
p2
=
getPP
(
p
,
2
,
pp
,
1
);
let
p3
=
getPP
(
p
,
3
,
pp
,
2
);
let
p4
=
getPP
(
p
,
4
,
pp
,
3
);
let
p5
=
getPP
(
p
,
5
,
pp
,
4
);
let
p6
=
getPP
(
p
,
6
,
pp
,
5
);
for
(
let
item
of
items
)
{
// console.log(p[1]);
let
items2
=
_pdfa
(
item
,
p
[
1
]
);
let
items2
=
_pdfa
(
item
,
p
1
);
// console.log(items2.length);
for
(
let
item2
of
items2
)
{
try
{
let
p2
=
getPP
(
p
,
2
,
pp
,
1
);
let
title
=
_pdfh
(
item2
,
p2
);
let
img
=
''
;
try
{
let
p3
=
getPP
(
p
,
3
,
pp
,
2
);
img
=
_pd
(
item2
,
p3
);
}
catch
(
e
)
{}
let
desc
=
''
;
try
{
let
p4
=
getPP
(
p
,
4
,
pp
,
3
);
desc
=
_pdfh
(
item2
,
p4
);
}
catch
(
e
)
{}
let
p5
=
getPP
(
p
,
5
,
pp
,
4
);
let
links
=
[];
for
(
let
_p5
of
p5
.
split
(
'
+
'
))
{
let
link
=
!
homeVodObj
.
detailUrl
?
_pd
(
item2
,
_p5
,
MY_URL
)
:
_pdfh
(
item2
,
_p5
);
...
...
@@ -1219,7 +1225,6 @@ function homeVodParse(homeVodObj){
}
let
content
;
if
(
p
.
length
>
6
&&
p
[
6
]){
let
p6
=
getPP
(
p
,
6
,
pp
,
5
);
content
=
_pdfh
(
item2
,
p6
);
}
else
{
content
=
''
;
...
...
@@ -1249,21 +1254,22 @@ function homeVodParse(homeVodObj){
}
else
{
let
items
=
_pdfa
(
html
,
p0
);
let
p1
=
getPP
(
p
,
1
,
pp
,
1
);
let
p2
=
getPP
(
p
,
2
,
pp
,
2
);
let
p3
=
getPP
(
p
,
3
,
pp
,
3
);
let
p4
=
getPP
(
p
,
4
,
pp
,
4
);
let
p5
=
getPP
(
p
,
5
,
pp
,
5
);
for
(
let
item
of
items
)
{
try
{
let
p1
=
getPP
(
p
,
1
,
pp
,
1
);
let
title
=
_pdfh
(
item
,
p1
);
let
img
=
''
;
try
{
let
p2
=
getPP
(
p
,
2
,
pp
,
2
);
img
=
_pd
(
item
,
p2
,
MY_URL
);
}
catch
(
e
)
{}
let
desc
=
''
;
try
{
let
p3
=
getPP
(
p
,
3
,
pp
,
3
);
desc
=
_pdfh
(
item
,
p3
);
}
catch
(
e
)
{}
let
p4
=
getPP
(
p
,
4
,
pp
,
4
);
let
links
=
[];
for
(
let
_p5
of
p4
.
split
(
'
+
'
))
{
let
link
=
!
homeVodObj
.
detailUrl
?
_pd
(
item
,
_p5
,
MY_URL
)
:
_pdfh
(
item
,
_p5
);
...
...
@@ -1271,7 +1277,6 @@ function homeVodParse(homeVodObj){
}
let
content
;
if
(
p
.
length
>
5
&&
p
[
5
]){
let
p5
=
getPP
(
p
,
5
,
pp
,
5
);
content
=
_pdfh
(
item
,
p5
);
}
else
{
content
=
''
...
...
libs/drpy.min.js
浏览文件 @
94543b8d
此差异已折叠。
点击以展开。
libs/drpy2.js
浏览文件 @
94543b8d
...
...
@@ -1027,8 +1027,12 @@ function homeParse(homeObj) {
* @returns {*}
*/
function
getPP
(
p
,
pn
,
pp
,
ppn
){
let
ps
=
p
[
pn
]
===
'
*
'
&&
pp
.
length
>
ppn
?
pp
[
ppn
]:
p
[
pn
]
return
ps
try
{
let
ps
=
p
[
pn
]
===
'
*
'
&&
pp
.
length
>
ppn
?
pp
[
ppn
]:
p
[
pn
]
return
ps
}
catch
(
e
)
{
return
''
}
}
/**
...
...
@@ -1086,25 +1090,27 @@ function homeVodParse(homeVodObj){
if
(
homeVodObj
.
double
)
{
let
items
=
_pdfa
(
html
,
p0
);
// console.log(items.length);
let
p1
=
getPP
(
p
,
1
,
pp
,
0
);
let
p2
=
getPP
(
p
,
2
,
pp
,
1
);
let
p3
=
getPP
(
p
,
3
,
pp
,
2
);
let
p4
=
getPP
(
p
,
4
,
pp
,
3
);
let
p5
=
getPP
(
p
,
5
,
pp
,
4
);
let
p6
=
getPP
(
p
,
6
,
pp
,
5
);
for
(
let
item
of
items
)
{
// console.log(p[1]);
let
items2
=
_pdfa
(
item
,
p
[
1
]
);
let
items2
=
_pdfa
(
item
,
p
1
);
// console.log(items2.length);
for
(
let
item2
of
items2
)
{
try
{
let
p2
=
getPP
(
p
,
2
,
pp
,
1
);
let
title
=
_pdfh
(
item2
,
p2
);
let
img
=
''
;
try
{
let
p3
=
getPP
(
p
,
3
,
pp
,
2
);
img
=
_pd
(
item2
,
p3
);
}
catch
(
e
)
{}
let
desc
=
''
;
try
{
let
p4
=
getPP
(
p
,
4
,
pp
,
3
);
desc
=
_pdfh
(
item2
,
p4
);
}
catch
(
e
)
{}
let
p5
=
getPP
(
p
,
5
,
pp
,
4
);
let
links
=
[];
for
(
let
_p5
of
p5
.
split
(
'
+
'
))
{
let
link
=
!
homeVodObj
.
detailUrl
?
_pd
(
item2
,
_p5
,
MY_URL
)
:
_pdfh
(
item2
,
_p5
);
...
...
@@ -1112,7 +1118,6 @@ function homeVodParse(homeVodObj){
}
let
content
;
if
(
p
.
length
>
6
&&
p
[
6
]){
let
p6
=
getPP
(
p
,
6
,
pp
,
5
);
content
=
_pdfh
(
item2
,
p6
);
}
else
{
content
=
''
;
...
...
@@ -1142,21 +1147,23 @@ function homeVodParse(homeVodObj){
}
else
{
let
items
=
_pdfa
(
html
,
p0
);
let
p1
=
getPP
(
p
,
1
,
pp
,
1
);
let
p2
=
getPP
(
p
,
2
,
pp
,
2
);
let
p3
=
getPP
(
p
,
3
,
pp
,
3
);
let
p4
=
getPP
(
p
,
4
,
pp
,
4
);
let
p5
=
getPP
(
p
,
5
,
pp
,
5
);
for
(
let
item
of
items
)
{
try
{
let
p1
=
getPP
(
p
,
1
,
pp
,
1
);
let
title
=
_pdfh
(
item
,
p1
);
let
img
=
''
;
try
{
let
p2
=
getPP
(
p
,
2
,
pp
,
2
);
img
=
_pd
(
item
,
p2
,
MY_URL
);
}
catch
(
e
)
{}
let
desc
=
''
;
try
{
let
p3
=
getPP
(
p
,
3
,
pp
,
3
);
desc
=
_pdfh
(
item
,
p3
);
}
catch
(
e
)
{}
let
p4
=
getPP
(
p
,
4
,
pp
,
4
);
let
links
=
[];
for
(
let
_p5
of
p4
.
split
(
'
+
'
))
{
let
link
=
!
homeVodObj
.
detailUrl
?
_pd
(
item
,
_p5
,
MY_URL
)
:
_pdfh
(
item
,
_p5
);
...
...
@@ -1164,7 +1171,6 @@ function homeVodParse(homeVodObj){
}
let
content
;
if
(
p
.
length
>
5
&&
p
[
5
]){
let
p5
=
getPP
(
p
,
5
,
pp
,
5
);
content
=
_pdfh
(
item
,
p5
);
}
else
{
content
=
''
...
...
libs/drpy2.min.js
浏览文件 @
94543b8d
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录