Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tianxiawei
dr_py
提交
f0ef3ac1
dr_py
项目概览
tianxiawei
/
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,发现更多精彩内容 >>
提交
f0ef3ac1
编写于
9月 13, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加了菜狗热搜
上级
e15a6ff5
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
50 addition
and
3 deletion
+50
-3
base/rules.db
base/rules.db
+0
-0
controllers/home.py
controllers/home.py
+6
-1
js/version.txt
js/version.txt
+1
-1
readme.md
readme.md
+1
-0
templates/config.txt
templates/config.txt
+24
-0
utils/files.py
utils/files.py
+1
-1
utils/update.py
utils/update.py
+17
-0
未找到文件。
base/rules.db
浏览文件 @
f0ef3ac1
无法预览此类型文件
controllers/home.py
浏览文件 @
f0ef3ac1
...
...
@@ -18,7 +18,7 @@ from utils.cfg import cfg
from
utils
import
parser
from
utils.log
import
logger
from
utils.files
import
getAlist
,
get_live_url
from
utils.update
import
getLocalVer
from
utils.update
import
getLocalVer
,
getHotSuggest
from
utils.encode
import
parseText
from
js.rules
import
getJxs
import
random
...
...
@@ -179,6 +179,11 @@ def getCustonDict(host):
logger
.
info
(
f
'用户自定义配置加载失败:
{
e
}
'
)
return
customConfig
@
home
.
route
(
'/hotsugg'
)
def
get_hot_search
():
data
=
getHotSuggest
()
return
R
.
success
(
'获取成功'
,
data
)
@
home
.
route
(
'/config/<int:mode>'
)
def
config_render
(
mode
):
# print(dict(app.config))
...
...
js/version.txt
浏览文件 @
f0ef3ac1
3.5.9
\ No newline at end of file
3.6.0
\ No newline at end of file
readme.md
浏览文件 @
f0ef3ac1
...
...
@@ -50,6 +50,7 @@
-
[X] 1.升级至3.5.8
-
[X] 2.迁移alist.conf文件,修改默认模板,增加模板url参数支持fyfilter变量从此支持更多筛选场景
-
[X] 3.升级至3.5.9,修复重大bug:模板继承导致的自动生成配置的搜索开关异常问题
-
[X] 4.增加菜狗热搜
###### 2022/09/12
###### 特别说明:仅pluto 1.4.2以上版本支持此项目的筛选及自定义播放免嗅
-
[X] 1.升级至3.5.7
...
...
templates/config.txt
浏览文件 @
f0ef3ac1
...
...
@@ -66,6 +66,30 @@
}{% if loop.last==False %},{% endif %}{% endfor %}
],
"flags": ["imgo","youku", "qq", "iqiyi", "qiyi", "letv", "sohu", "tudou","xigua","cntv","1905", "pptv", "mgtv", "wasu", "bilibili", "renrenmi"],
"hotSearch": [{
"name": "mobilesearch",
"request": {
"method": "GET",
"header": [
{
"key": "Referer",
"value": "{{ host }}"
}
],
"url": {
"raw": "{{ host }}/hotsugg?t={time}"
}
},
"response": {
"result": "$.data",
"data": [
{
"key": "keyword",
"value": "title"
}
]
}
}],
"lives":[{"group":"redirect","channels":[{"name":"直播","urls":["proxy://do=live&type=txt&ext={{live_url}}"]}]}],
"ijk": [{
"group": "软解码",
...
...
utils/files.py
浏览文件 @
f0ef3ac1
...
...
@@ -75,7 +75,7 @@ def custom_merge(original:dict,custom:dict):
new_keys
=
custom
.
keys
()
updateObj
=
{}
extend_obj
=
{}
for
key
in
[
'wallpaper'
,
'spider'
,
'homepage'
,
'lives'
]:
for
key
in
[
'wallpaper'
,
'spider'
,
'homepage'
,
'lives'
,
'hotSearch'
]:
if
key
in
new_keys
:
updateObj
[
key
]
=
custom
[
key
]
...
...
utils/update.py
浏览文件 @
f0ef3ac1
...
...
@@ -12,12 +12,29 @@ import zipfile
import
shutil
# https://blog.csdn.net/weixin_33130113/article/details/112336581
from
utils.log
import
logger
from
utils.web
import
get_interval
from
utils.htmlParser
import
jsoup
headers
=
{
'Referer'
:
'https://gitcode.net/'
,
'user-agent'
:
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36'
,
}
def
getHotSuggest
(
url
=
'http://4g.v.sogou.com/hotsugg'
):
jsp
=
jsoup
(
url
)
pdfh
=
jsp
.
pdfh
pdfa
=
jsp
.
pdfa
pd
=
jsp
.
pd
try
:
r
=
requests
.
get
(
url
,
headers
=
headers
,
timeout
=
2
)
html
=
r
.
text
data
=
pdfa
(
html
,
'ul.hot-list&&li'
)
suggs
=
[{
'title'
:
pdfh
(
dt
,
'a&&Text'
),
'url'
:
pd
(
dt
,
'a&&href'
)}
for
dt
in
data
]
# print(html)
# print(suggs)
return
suggs
except
:
return
[]
def
getLocalVer
():
base_path
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
)))
# 上级目录
version_path
=
os
.
path
.
join
(
base_path
,
f
'js/version.txt'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录