Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
molin.JC
dr_py
提交
a247a008
dr_py
项目概览
molin.JC
/
dr_py
与 Fork 源项目一致
Fork自
晚风拂柳颜 / dr_py
通知
1
Star
1
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,发现更多精彩内容 >>
提交
a247a008
编写于
8月 26, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加指定编码
上级
33224bc7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
95 addition
and
4 deletion
+95
-4
models/cms.py
models/cms.py
+6
-4
pycms2.json
pycms2.json
+87
-0
readme.md
readme.md
+2
-0
未找到文件。
models/cms.py
浏览文件 @
a247a008
...
...
@@ -22,6 +22,7 @@ class CMS:
searchUrl
=
rule
.
get
(
'searchUrl'
,
''
)
headers
=
rule
.
get
(
'headers'
,{})
limit
=
rule
.
get
(
'limit'
,
6
)
encoding
=
rule
.
get
(
'编码'
,
'utf-8'
)
self
.
limit
=
min
(
limit
,
20
)
keys
=
headers
.
keys
()
for
k
in
headers
.
keys
():
...
...
@@ -55,6 +56,7 @@ class CMS:
self
.
搜索
=
rule
.
get
(
'搜索'
,
''
)
self
.
推荐
=
rule
.
get
(
'推荐'
,
''
)
self
.
title
=
rule
.
get
(
'title'
,
''
)
self
.
encoding
=
encoding
self
.
timeout
=
round
(
int
(
timeout
)
/
1000
,
2
)
self
.
filter
=
rule
.
get
(
'filter'
,[])
self
.
extend
=
rule
.
get
(
'extend'
,[])
...
...
@@ -128,7 +130,7 @@ class CMS:
# print(self.class_parse)
try
:
r
=
requests
.
get
(
self
.
homeUrl
,
headers
=
self
.
headers
,
timeout
=
self
.
timeout
)
r
.
encoding
=
r
.
apparent_
encoding
r
.
encoding
=
self
.
encoding
html
=
r
.
text
if
self
.
class_parse
:
p
=
self
.
class_parse
.
split
(
';'
)
...
...
@@ -245,7 +247,7 @@ class CMS:
if
fypage
==
1
and
self
.
test
(
'[\[\]]'
,
url
):
url
=
url
.
split
(
'['
)[
1
].
split
(
']'
)[
0
]
r
=
requests
.
get
(
url
,
headers
=
self
.
headers
,
timeout
=
self
.
timeout
)
r
.
encoding
=
r
.
apparent_
encoding
r
.
encoding
=
self
.
encoding
print
(
r
.
url
)
p
=
self
.
一级
.
split
(
';'
)
# 解析
if
len
(
p
)
<
5
:
...
...
@@ -291,7 +293,7 @@ class CMS:
url
=
detailUrl
# print(url)
r
=
requests
.
get
(
url
,
headers
=
self
.
headers
,
timeout
=
self
.
timeout
)
r
.
encoding
=
r
.
apparent_
encoding
r
.
encoding
=
self
.
encoding
html
=
r
.
text
# print(html)
p
=
self
.
二级
# 解析
...
...
@@ -402,7 +404,7 @@ class CMS:
url
=
self
.
searchUrl
.
replace
(
'**'
,
key
).
replace
(
'fypage'
,
pg
)
print
(
url
)
r
=
requests
.
get
(
url
,
headers
=
self
.
headers
)
r
.
encoding
=
r
.
apparent_
encoding
r
.
encoding
=
self
.
encoding
html
=
r
.
text
if
not
self
.
搜索
:
return
self
.
blank
()
...
...
pycms2.json
0 → 100644
浏览文件 @
a247a008
{
"sites"
:[
{
"key"
:
"dr_yanaifei"
,
"name"
:
"鸭奈飞(道长)"
,
"type"
:
1
,
"api"
:
"http://localhost:5705/vod?rule=鸭奈飞"
,
"searchable"
:
1
,
"quickSearch"
:
1
,
"filterable"
:
1
},
{
"key"
:
"dr_lmys"
,
"name"
:
"蓝莓影视(道长)"
,
"type"
:
1
,
"api"
:
"http://localhost:5705/vod?rule=蓝莓影视"
,
"searchable"
:
0
,
"quickSearch"
:
0
,
"filterable"
:
1
},
{
"key"
:
"dr_555"
,
"name"
:
"555影视(道长)"
,
"type"
:
1
,
"api"
:
"http://localhost:5705/vod?rule=555影视"
,
"searchable"
:
1
,
"quickSearch"
:
1
,
"filterable"
:
1
},
{
"key"
:
"dr_wojj"
,
"name"
:
"玩偶姐姐(道长)"
,
"type"
:
1
,
"api"
:
"http://localhost:5705/vod?rule=玩偶姐姐"
,
"searchable"
:
0
,
"quickSearch"
:
0
,
"filterable"
:
0
}
],
"parses"
:[
{
"name"
:
"解析聚合"
,
"type"
:
3
,
"url"
:
"Demo"
},
{
"name"
:
"Json并发"
,
"type"
:
2
,
"url"
:
"Parallel"
},
{
"name"
:
"Json轮询"
,
"type"
:
2
,
"url"
:
"Sequence"
},
{
"name"
:
"油果"
,
"type"
:
1
,
"url"
:
"http://json.youguo520.top/fufeng/?url="
,
"ext"
:{
"flag"
:[
"qiyi"
,
"爱奇艺"
,
"奇艺"
,
"qq"
,
"腾讯"
,
"youku"
,
"优酷"
,
"pptv"
,
"PPTV"
,
"letv"
,
"乐视"
,
"bilibili"
,
"哔哩哔哩"
,
"哔哩"
,
"mgtv"
,
"芒果"
],
"header"
:{
"User-Agent"
:
"Dart/2.14 (dart:io)"
}}},
{
"name"
:
"江湖"
,
"type"
:
1
,
"url"
:
"http://jx.vipmv.co/?url="
,
"ext"
:{
"flag"
:[
"qq"
,
"qiyi"
,
"mgtv"
,
"youku"
,
"letv"
,
"sohu"
,
"xigua"
,
"cntv"
,
"1905"
],
"header"
:{
"User-Agent"
:
"Dart/2.14 (dart:io)"
}}}
],
"flags"
:[
"youku"
,
"qq"
,
"iqiyi"
,
"qiyi"
,
"letv"
,
"sohu"
,
"tudou"
,
"pptv"
,
"mgtv"
,
"wasu"
,
"bilibili"
,
"renrenmi"
],
"ijk"
:[
{
"group"
:
"软解码"
,
"options"
:[
{
"category"
:
4
,
"name"
:
"opensles"
,
"value"
:
"0"
},
{
"category"
:
4
,
"name"
:
"overlay-format"
,
"value"
:
"842225234"
},
{
"category"
:
4
,
"name"
:
"framedrop"
,
"value"
:
"1"
},
{
"category"
:
4
,
"name"
:
"soundtouch"
,
"value"
:
"1"
},
{
"category"
:
4
,
"name"
:
"start-on-prepared"
,
"value"
:
"1"
},
{
"category"
:
1
,
"name"
:
"http-detect-range-support"
,
"value"
:
"0"
},
{
"category"
:
1
,
"name"
:
"fflags"
,
"value"
:
"fastseek"
},
{
"category"
:
2
,
"name"
:
"skip_loop_filter"
,
"value"
:
"48"
},
{
"category"
:
4
,
"name"
:
"reconnect"
,
"value"
:
"1"
},
{
"category"
:
4
,
"name"
:
"enable-accurate-seek"
,
"value"
:
"0"
},
{
"category"
:
4
,
"name"
:
"mediacodec"
,
"value"
:
"0"
},
{
"category"
:
4
,
"name"
:
"mediacodec-auto-rotate"
,
"value"
:
"0"
},
{
"category"
:
4
,
"name"
:
"mediacodec-handle-resolution-change"
,
"value"
:
"0"
},
{
"category"
:
4
,
"name"
:
"mediacodec-hevc"
,
"value"
:
"0"
},
{
"category"
:
1
,
"name"
:
"dns_cache_timeout"
,
"value"
:
"600000000"
}
]},
{
"group"
:
"硬解码"
,
"options"
:[
{
"category"
:
4
,
"name"
:
"opensles"
,
"value"
:
"0"
},
{
"category"
:
4
,
"name"
:
"overlay-format"
,
"value"
:
"842225234"
},
{
"category"
:
4
,
"name"
:
"framedrop"
,
"value"
:
"1"
},
{
"category"
:
4
,
"name"
:
"soundtouch"
,
"value"
:
"1"
},
{
"category"
:
4
,
"name"
:
"start-on-prepared"
,
"value"
:
"1"
},
{
"category"
:
1
,
"name"
:
"http-detect-range-support"
,
"value"
:
"0"
},
{
"category"
:
1
,
"name"
:
"fflags"
,
"value"
:
"fastseek"
},
{
"category"
:
2
,
"name"
:
"skip_loop_filter"
,
"value"
:
"48"
},
{
"category"
:
4
,
"name"
:
"reconnect"
,
"value"
:
"1"
},
{
"category"
:
4
,
"name"
:
"enable-accurate-seek"
,
"value"
:
"0"
},
{
"category"
:
4
,
"name"
:
"mediacodec"
,
"value"
:
"1"
},
{
"category"
:
4
,
"name"
:
"mediacodec-auto-rotate"
,
"value"
:
"1"
},
{
"category"
:
4
,
"name"
:
"mediacodec-handle-resolution-change"
,
"value"
:
"1"
},
{
"category"
:
4
,
"name"
:
"mediacodec-hevc"
,
"value"
:
"1"
},
{
"category"
:
1
,
"name"
:
"dns_cache_timeout"
,
"value"
:
"600000000"
}
]}
],
"ads"
:[
"mimg.0c1q0l.cn"
,
"www.googletagmanager.com"
,
"www.google-analytics.com"
,
"mc.usihnbcq.cn"
,
"mg.g1mm3d.cn"
,
"mscs.svaeuzh.cn"
,
"cnzz.hhttm.top"
,
"tp.vinuxhome.com"
,
"cnzz.mmstat.com"
,
"www.baihuillq.com"
,
"s23.cnzz.com"
,
"z3.cnzz.com"
,
"c.cnzz.com"
,
"stj.v1vo.top"
,
"z12.cnzz.com"
,
"img.mosflower.cn"
,
"tips.gamevvip.com"
,
"ehwe.yhdtns.com"
,
"xdn.cqqc3.com"
,
"www.jixunkyy.cn"
,
"sp.chemacid.cn"
,
"hm.baidu.com"
,
"s9.cnzz.com"
,
"z6.cnzz.com"
,
"um.cavuc.com"
,
"mav.mavuz.com"
,
"wofwk.aoidf3.com"
,
"z5.cnzz.com"
,
"xc.hubeijieshikj.cn"
,
"tj.tianwenhu.com"
,
"xg.gars57.cn"
,
"k.jinxiuzhilv.com"
,
"cdn.bootcss.com"
,
"ppl.xunzhuo123.com"
,
"xomk.jiangjunmh.top"
,
"img.xunzhuo123.com"
,
"z1.cnzz.com"
,
"s13.cnzz.com"
,
"xg.huataisangao.cn"
,
"z7.cnzz.com"
,
"xg.huataisangao.cn"
,
"z2.cnzz.com"
,
"s96.cnzz.com"
,
"q11.cnzz.com"
,
"thy.dacedsfa.cn"
,
"xg.whsbpw.cn"
,
"s19.cnzz.com"
,
"z8.cnzz.com"
,
"s4.cnzz.com"
,
"f5w.as12df.top"
,
"ae01.alicdn.com"
,
"www.92424.cn"
,
"k.wudejia.com"
,
"vivovip.mmszxc.top"
,
"qiu.xixiqiu.com"
,
"cdnjs.hnfenxun.com"
,
"cms.qdwght.com"
]
}
\ No newline at end of file
readme.md
浏览文件 @
a247a008
...
...
@@ -10,6 +10,7 @@
-
[X] 7.获取二级详情函数增加了线程池的使用
-
[ ] 8.模板自定义filter过滤
-
[X] 9.网页端显示缓存的规则以及提供点击清除缓存操作
-
[X] 10.增加本地配置文件,增加指定编码。
###### 特性说明
1.
参考了海阔视界dr模板设计思路
2.
参考tv_box的t4项目思路重新设计了cms接口
...
...
@@ -41,6 +42,7 @@
```
javascript
var
rule
=
{
title
:
''
,
//规则标题,没有实际作用,但是可以作为cms类名称依据
编码
:
''
,
//不填就默认utf-8
host
:
''
,
//网页的域名根,包含http头如 https://www,baidu.com
homeUrl
:
'
/latest/
'
,
//网站的首页链接,可以是完整路径或者相对路径,用于分类获取和推荐获取 fyclass是分类标签 fypage是页数
url
:
'
/fyclass/fypage.html[/fyclass/]
'
,
//网站的分类页面链接
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录