Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
没毛的刷子
dr_py
提交
87e9cbb5
dr_py
项目概览
没毛的刷子
/
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,发现更多精彩内容 >>
提交
87e9cbb5
编写于
9月 06, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
支持alist
上级
abcbe303
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
60 addition
and
34 deletion
+60
-34
app.py
app.py
+6
-4
js/alist.conf
js/alist.conf
+26
-0
js/alist.txt
js/alist.txt
+0
-27
js/version.txt
js/version.txt
+1
-1
readme.md
readme.md
+1
-0
templates/config.txt
templates/config.txt
+1
-0
utils/web.py
utils/web.py
+25
-2
未找到文件。
app.py
浏览文件 @
87e9cbb5
...
...
@@ -535,9 +535,10 @@ def config_render(mode):
new_conf
=
dict
(
app
.
config
)
host
=
getHost
(
mode
)
jxs
=
getJxs
()
alists
=
getAlist
()
live_url
=
get_live_url
(
new_conf
,
mode
)
# html = render_template('config.txt',rules=getRules('js'),host=host,mode=mode,jxs=jxs,base64Encode=base64Encode,config=new_conf)
html
=
render_template
(
'config.txt'
,
rules
=
getRules
(
'js'
),
host
=
host
,
mode
=
mode
,
jxs
=
jxs
,
live_url
=
live_url
,
config
=
new_conf
)
html
=
render_template
(
'config.txt'
,
rules
=
getRules
(
'js'
),
host
=
host
,
mode
=
mode
,
jxs
=
jxs
,
alists
=
alists
,
live_url
=
live_url
,
config
=
new_conf
)
response
=
make_response
(
html
)
response
.
headers
[
'Content-Type'
]
=
'application/json; charset=utf-8'
return
response
...
...
@@ -576,10 +577,11 @@ def config_gen():
os
.
makedirs
(
'txt'
,
exist_ok
=
True
)
new_conf
=
dict
(
app
.
config
)
jxs
=
getJxs
()
set_local
=
render_template
(
'config.txt'
,
rules
=
getRules
(
'js'
),
live_url
=
get_live_url
(
new_conf
,
0
),
mode
=
0
,
host
=
getHost
(
0
),
jxs
=
jxs
)
alists
=
getAlist
()
set_local
=
render_template
(
'config.txt'
,
rules
=
getRules
(
'js'
),
alists
=
alists
,
live_url
=
get_live_url
(
new_conf
,
0
),
mode
=
0
,
host
=
getHost
(
0
),
jxs
=
jxs
)
print
(
set_local
)
set_area
=
render_template
(
'config.txt'
,
rules
=
getRules
(
'js'
),
live_url
=
get_live_url
(
new_conf
,
1
),
mode
=
1
,
host
=
getHost
(
1
),
jxs
=
jxs
)
set_online
=
render_template
(
'config.txt'
,
rules
=
getRules
(
'js'
),
live_url
=
get_live_url
(
new_conf
,
2
),
mode
=
1
,
host
=
getHost
(
2
),
jxs
=
jxs
)
set_area
=
render_template
(
'config.txt'
,
rules
=
getRules
(
'js'
),
alists
=
alists
,
live_url
=
get_live_url
(
new_conf
,
1
),
mode
=
1
,
host
=
getHost
(
1
),
jxs
=
jxs
)
set_online
=
render_template
(
'config.txt'
,
rules
=
getRules
(
'js'
),
alists
=
alists
,
live_url
=
get_live_url
(
new_conf
,
2
),
mode
=
1
,
host
=
getHost
(
2
),
jxs
=
jxs
)
with
open
(
'txt/pycms0.json'
,
'w+'
,
encoding
=
'utf-8'
)
as
f
:
set_dict
=
json
.
loads
(
set_local
)
f
.
write
(
json
.
dumps
(
set_dict
,
ensure_ascii
=
False
,
indent
=
4
))
...
...
js/alist.conf
0 → 100644
浏览文件 @
87e9cbb5
# c=[];for(let i in a){c.push(i+','+a[i])}d=c.join('\n');console.log(d);
🔮嗨翻,
https
://
pan
.
hikerfans
.
com
🦀
9
T
(
Adult
),
https
://
drive
.
9
t
.
ee
🐱梓澪の妙妙屋,
https
://
xn
--
i0v44m
.
xyz
🚆资源小站,
https
://
pan
.
142856
.
xyz
🌤晴园的宝藏库,
https
://
alist
.
52
qy
.
repl
.
co
🐭米奇妙妙屋,
https
://
anime
.
mqmmw
.
ga
💂小兵组网盘影视,
https
://
6
vv
.
app
📀小光盘,
https
://
alist
.
xiaoguanxiaocheng
.
life
🐋一只鱼,
https
://
alist
.
youte
.
ml
🌊七米蓝,
https
://
al
.
chirmyram
.
com
🌴非盘,
http
://
www
.
feifwp
.
top
🥼帅盘,
https
://
hi
.
shuaipeng
.
wang
🐉神族九帝,
https
://
alist
.
shenzjd
.
com
☃姬路白雪,
https
://
pan
.
jlbx
.
xyz
🎧听闻网盘,
https
://
wangpan
.
sangxuesheng
.
com
💾
DISK
,
http
://
124
.
222
.
140
.
243
:
8080
🌨云播放,
https
://
quanzi
.
laoxianghuijia
.
cn
✨星梦,
https
://
pan
.
bashroot
.
top
🌊小江,
https
://
dyj
.
me
💫触光,
https
://
pan
.
ichuguang
.
com
🕵好汉吧,
https
://
8023
.
haohanba
.
cn
🥗
AUNEY
,
http
://
121
.
227
.
25
.
116
:
8008
🎡资源小站,
https
://
960303
.
xyz
/
🏝
fenwe
,
http
://
www
.
fenwe
.
tk
:
5244
🎢轻弹浅唱,
https
://
g
.
xiang
.
lol
\ No newline at end of file
js/alist.txt
已删除
100644 → 0
浏览文件 @
abcbe303
{
"🔮嗨翻":"https://pan.hikerfans.com",
"🦀9T(Adult)":"https://drive.9t.ee",
"🐱梓澪の妙妙屋":"https://xn--i0v44m.xyz",
"🚆资源小站":"https://pan.142856.xyz",
"🌤晴园的宝藏库":"https://alist.52qy.repl.co",
"🐭米奇妙妙屋":"https://anime.mqmmw.ga",
"💂小兵组网盘影视":"https://6vv.app",
"📀小光盘":"https://alist.xiaoguanxiaocheng.life",
"🐋一只鱼":"https://alist.youte.ml",
"🌊七米蓝":"https://al.chirmyram.com",
"🌴非盘":"http://www.feifwp.top",
"🥼帅盘":"https://hi.shuaipeng.wang",
"🐉神族九帝":"https://alist.shenzjd.com",
"☃姬路白雪":"https://pan.jlbx.xyz",
"🎧听闻网盘":"https://wangpan.sangxuesheng.com",
"💾DISK":"http://124.222.140.243:8080",
"🌨云播放":"https://quanzi.laoxianghuijia.cn",
"✨星梦":"https://pan.bashroot.top",
"🌊小江":"https://dyj.me",
"💫触光":"https://pan.ichuguang.com",
"🕵好汉吧":"https://8023.haohanba.cn",
"🥗AUNEY":"http://121.227.25.116:8008",
"🎡资源小站":"https://960303.xyz/",
"🏝fenwe":"http://www.fenwe.tk:5244",
"🎢轻弹浅唱":"https://g.xiang.lol"
}
js/version.txt
浏览文件 @
87e9cbb5
3.1.6
\ No newline at end of file
3.1.7
\ No newline at end of file
readme.md
浏览文件 @
87e9cbb5
...
...
@@ -51,6 +51,7 @@
-
[X] 2.增加了后台管理界面修改直播源地址和同步直播源
-
[X] 3.首页推荐内容不限制数量(新版pluto牛逼!!!)
-
[X] 4.增加lsg配置模型和缓存
-
[X] 5.增加了默认alist挂载
###### 2022/09/05
-
[X] 1.内置jar修复了原本tv_box无法播放直播的问题
-
[X] 2.重新构建了三种平台的镜像 amd64,armv7,arm64
...
...
templates/config.txt
浏览文件 @
87e9cbb5
...
...
@@ -3,6 +3,7 @@
"dr_count": {{rules.list|length}},
"mode": {{ mode }},
"spider": "{{ host }}/liveslib",
{% if alists|length > 0 %}"drives": {{alists}},{% endif %}
"homepage":"https://gitcode.net/qq_32394351/dr_py",
"sites": [{% for rule in rules.list %}{% if mode == 0 %}
{
...
...
utils/web.py
浏览文件 @
87e9cbb5
...
...
@@ -3,7 +3,7 @@
# File : web.py
# Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
# Date : 2022/8/25
import
os
import
socket
import
hashlib
from
werkzeug.utils
import
import_string
...
...
@@ -115,4 +115,27 @@ def getHeaders(url):
headers
.
setdefault
(
"User-Agent"
,
PC_UA
)
headers
.
setdefault
(
"Accept"
,
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
)
headers
.
setdefault
(
"Accept-Language"
,
"zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2"
)
return
headers
\ No newline at end of file
return
headers
def
getAlist
():
base_path
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
)))
# 上级目录
alist_path
=
os
.
path
.
join
(
base_path
,
'js/alist.conf'
)
with
open
(
alist_path
,
encoding
=
'utf-8'
)
as
f
:
data
=
f
.
read
().
strip
()
alists
=
[]
for
i
in
data
.
split
(
'
\n
'
):
i
=
i
.
strip
()
dt
=
i
.
split
(
','
)
if
not
i
.
strip
().
startswith
(
'#'
):
obj
=
{
'name'
:
dt
[
0
],
'server'
:
dt
[
1
],
'type'
:
"alist"
,
}
if
len
(
dt
)
>
2
:
obj
.
update
({
'password'
:
dt
[
2
]
})
alists
.
append
(
obj
)
print
(
f
'共计
{
len
(
alists
)
}
条alist记录'
)
return
alists
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录