Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
pgl99
dr_py
提交
2d20ec3c
dr_py
项目概览
pgl99
/
dr_py
与 Fork 源项目一致
2023-03-02 03:36:06同步失败
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,发现更多精彩内容 >>
提交
2d20ec3c
编写于
8月 26, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化源的写法和说明文件
上级
3e5614f3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
48 addition
and
14 deletion
+48
-14
js/555影视.js
js/555影视.js
+7
-2
js/蓝莓影视.js
js/蓝莓影视.js
+3
-2
js/鸭奈飞.js
js/鸭奈飞.js
+3
-3
models/cms.py
models/cms.py
+7
-6
readme.md
readme.md
+28
-1
未找到文件。
js/555影视.js
浏览文件 @
2d20ec3c
var
rule
=
{
title
:
'
555影视
'
,
url
:
'
https://www.5dy5.cc/vodshow/fyclass--------fypage---.html
'
,
host
:
'
https://www.5dy5.cc
'
,
// homeUrl:'/',
url
:
'
/vodshow/fyclass--------fypage---.html
'
,
searchUrl
:
'
/vodsearch/**----------fypage---.html
'
,
ua
:
'
MOBILE_UA
'
,
headers
:{
//网站的请求头,完整支持所有的,常带ua和cookies
'
User-Agent
'
:
'
MOBILE_UA
'
,
"
Cookie
"
:
"
searchneed=ok
"
},
class_name
:
'
电影&连续剧&福利&动漫&综艺
'
,
class_url
:
'
1&2&124&4&3
'
,
一级
:
'
body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href
'
,
...
...
js/蓝莓影视.js
浏览文件 @
2d20ec3c
var
rule
=
{
title
:
'
蓝莓影视
'
,
url
:
'
https://lanmeiguojiang.com/show/fyclass--------fypage---.html
'
,
host
:
'
https://lanmeiguojiang.com
'
,
// homeUrl:'/',
url
:
'
/show/fyclass--------fypage---.html
'
,
searchUrl
:
'
/vodsearch/**----------fypage---.html
'
,
ua
:
'
MOBILE_UA
'
,
class_name
:
'
电影&网剧&剧集&动漫&综艺&记录
'
,
class_url
:
'
20&1&2&3&4&23
'
,
一级
:
'
body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href
'
,
...
...
js/鸭奈飞.js
浏览文件 @
2d20ec3c
var
rule
=
{
title
:
'
鸭奈飞
'
,
url
:
'
https://yanetflix.com/vodshow/fyclass--------fypage---.html
'
,
host
:
'
https://yanetflix.com
'
,
// homeUrl:'/',
url
:
'
/vodshow/fyclass--------fypage---.html
'
,
detailUrl
:
'
https://yanetflix.com/voddetail/fyid.html
'
,
//非必填
// url:'https://yanetflix.com/vodshow/',
searchUrl
:
'
/vodsearch/**----------fypage---.html
'
,
ua
:
'
MOBILE_UA
'
,
class_name
:
'
电影&连续剧&综艺&动漫
'
,
class_url
:
'
dianying&lianxuju&zongyi&dongman
'
,
一级
:
'
body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href
'
,
...
...
models/cms.py
浏览文件 @
2d20ec3c
...
...
@@ -14,7 +14,7 @@ class CMS:
def
__init__
(
self
,
rule
):
host
=
rule
.
get
(
'host'
,
''
).
rstrip
(
'/'
)
timeout
=
rule
.
get
(
'timeout'
,
2000
)
homeUrl
=
rule
.
get
(
'homeUrl'
,
''
)
homeUrl
=
rule
.
get
(
'homeUrl'
,
'
/
'
)
url
=
rule
.
get
(
'url'
,
''
)
detailUrl
=
rule
.
get
(
'detailUrl'
,
''
)
searchUrl
=
rule
.
get
(
'searchUrl'
,
''
)
...
...
@@ -116,7 +116,7 @@ class CMS:
'type_id'
:
class_urls
[
i
]
})
# print(self.url)
if
self
.
homeUrl
and
self
.
class_parse
:
if
self
.
homeUrl
.
startswith
(
'http'
)
and
self
.
class_parse
:
# print(self.homeUrl)
# print(self.class_parse)
try
:
...
...
@@ -204,7 +204,6 @@ class CMS:
"vod_remarks"
:
desc
,
"vod_content"
:
content
,
})
print
(
videos
)
result
[
'list'
]
=
videos
result
[
'page'
]
=
fypage
result
[
'pagecount'
]
=
9999
...
...
@@ -364,14 +363,16 @@ class CMS:
if
__name__
==
'__main__'
:
from
utils
import
parser
js_path
=
f
'js/玩偶姐姐.js'
# js_path = f'js/玩偶姐姐.js'
js_path
=
f
'js/蓝莓影视.js'
ctx
,
js_code
=
parser
.
runJs
(
js_path
)
rule
=
ctx
.
eval
(
'rule'
)
cms
=
CMS
(
rule
)
print
(
cms
.
title
)
# print(cms.homeContent())
print
(
cms
.
homeContent
())
print
(
cms
.
categoryContent
(
'20'
,
1
))
# print(cms.categoryContent('latest',1))
print
(
cms
.
detailContent
([
'https://hongkongdollvideo.com/video/b22c7cb6df40a3c4.html'
]))
#
print(cms.detailContent(['https://hongkongdollvideo.com/video/b22c7cb6df40a3c4.html']))
# cms.categoryContent('dianying',1)
# print(cms.detailContent(['67391']))
# print(cms.searchContent('斗罗大陆'))
\ No newline at end of file
readme.md
浏览文件 @
2d20ec3c
...
...
@@ -13,4 +13,31 @@
并且pluto要自己切换路径为PlutoPlayer
### 相关教程
[
pyquery定位
](
https://blog.csdn.net/Arise007/article/details/79513094
)
\ No newline at end of file
[
pyquery定位
](
https://blog.csdn.net/Arise007/article/details/79513094
)
### 模板规则说明
所有相关属性说明
```
javascript
var
rule
=
{
title
:
''
,
//规则标题,没有实际作用,但是可以作为cms类名称依据
host
:
''
,
//网页的域名根,包含http头如 https://www,baidu.com
homeUrl
:
'
/latest/
'
,
//网站的首页链接,可以是完整路径或者相对路径,用于分类获取和推荐获取 fyclass是分类标签 fypage是页数
url
:
'
/fyclass/fypage.html[/fyclass/]
'
,
//网站的分类页面链接
detailUrl
:
'
https://yanetflix.com/voddetail/fyid.html
'
,
//非必填,二级详情拼接链接,感觉没啥卵用
searchUrl
:
''
,
//搜索链接 可以是完整路径或者相对路径,用于分类获取和推荐获取 **代表搜索词 fypage代表页数
headers
:{
//网站的请求头,完整支持所有的,常带ua和cookies
'
User-Agent
'
:
'
MOBILE_UA
'
,
"
Cookie
"
:
"
searchneed=ok
"
},
timeout
:
5000
,
//网站的全局请求超时,默认是2000毫秒
//动态分类获取 列表;标题;链接;正则提取 不需要正则的时候后面别加分号
class_parse
:
'
#side-menu:lt(1) li;a&&Text;a&&href;com/(.*?)/
'
,
// 类似海阔一级 列表;标题;图片;描述;链接;详情 其中最后一个参数选填
一级
:
'
.col-sm-6;h3&&Text;img&&data-src;.date&&Text;a&&href
'
,
// 二级可以是*,表示规则无二级,直接拿一级的链接进行嗅探
// 或者 {title:'',img:'',desc:'',content:'',tabs:'',lists:''} 同海阔dr二级
二级
:
'
*
'
,
// 搜索可以是*,集成一级,或者跟一级一样的写法 列表;标题;图片;描述;链接;详情
搜索
:
'
*
'
,
}
```
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录