提交 0d16f9b2 编写于 作者: H hjdhnx

本地直播地址进行base64编码,兼容原版tv_box使用

上级 52452573
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------ # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
# Date : 2022/8/25 # Date : 2022/8/25
import random import random
from utils.encode import base64Encode
import js2py import js2py
from flask_sqlalchemy import SQLAlchemy from flask_sqlalchemy import SQLAlchemy
import config import config
...@@ -289,7 +289,7 @@ def config_render(mode): ...@@ -289,7 +289,7 @@ def config_render(mode):
if mode == 1: if mode == 1:
jyw_ip = getHost(mode) jyw_ip = getHost(mode)
logger.info(jyw_ip) logger.info(jyw_ip)
html = render_template('config.txt',rules=getRules('js'),host=getHost(mode),mode=mode,jxs=getJxs(),config=dict(app.config)) html = render_template('config.txt',rules=getRules('js'),host=getHost(mode),mode=mode,jxs=getJxs(),base64Encode=base64Encode,config=dict(app.config))
response = make_response(html) response = make_response(html)
response.headers['Content-Type'] = 'application/json; charset=utf-8' response.headers['Content-Type'] = 'application/json; charset=utf-8'
return response return response
...@@ -312,9 +312,9 @@ def config_gen(): ...@@ -312,9 +312,9 @@ def config_gen():
# 生成文件 # 生成文件
os.makedirs('txt',exist_ok=True) os.makedirs('txt',exist_ok=True)
jxs=getJxs() jxs=getJxs()
set_local = render_template('config.txt',rules=getRules('js'),mode=0,host=getHost(0),jxs=jxs) set_local = render_template('config.txt',rules=getRules('js'),base64Encode=base64Encode,mode=0,host=getHost(0),jxs=jxs)
set_area = render_template('config.txt',rules=getRules('js'),mode=1,host=getHost(1),jxs=jxs) set_area = render_template('config.txt',rules=getRules('js'),base64Encode=base64Encode,mode=1,host=getHost(1),jxs=jxs)
set_online = render_template('config.txt',rules=getRules('js'),mode=1,host=getHost(2),jxs=jxs) set_online = render_template('config.txt',rules=getRules('js'),base64Encode=base64Encode,mode=1,host=getHost(2),jxs=jxs)
with open('txt/pycms0.json','w+',encoding='utf-8') as f: with open('txt/pycms0.json','w+',encoding='utf-8') as f:
set_dict = json.loads(set_local) set_dict = json.loads(set_local)
f.write(json.dumps(set_dict,ensure_ascii=False,indent=4)) f.write(json.dumps(set_dict,ensure_ascii=False,indent=4))
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
}{% if loop.last==False %},{% endif %}{% endfor %} }{% if loop.last==False %},{% endif %}{% endfor %}
], ],
"flags": ["youku", "qq", "iqiyi", "qiyi", "letv", "sohu", "tudou","xigua","cntv","1905", "pptv", "mgtv", "wasu", "bilibili", "renrenmi"], "flags": ["youku", "qq", "iqiyi", "qiyi", "letv", "sohu", "tudou","xigua","cntv","1905", "pptv", "mgtv", "wasu", "bilibili", "renrenmi"],
"lives":[{"group":"redirect","channels":[{"name":"直播","urls":["proxy://do=live&type=txt&ext={{ host }}/lives"]}]}], "lives":[{"group":"redirect","channels":[{"name":"直播","urls":["proxy://do=live&type=txt&ext={{ base64Encode(host+'/lives') }}"]}]}],
"ijk": [{ "ijk": [{
"group": "软解码", "group": "软解码",
"options": [{ "options": [{
......
{ {
"dr_count": 9, "wallpaper": "http://localhost:5705/pics",
"dr_count": 11,
"mode": 0, "mode": 0,
"sites": [ "sites": [
{ {
...@@ -9,16 +10,16 @@ ...@@ -9,16 +10,16 @@
"api": "http://localhost:5705/vod?rule=555影视", "api": "http://localhost:5705/vod?rule=555影视",
"searchable": 1, "searchable": 1,
"quickSearch": 1, "quickSearch": 1,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_cokemv", "key": "dr_cokemv",
"name": "cokemv(道长)", "name": "cokemv(道长)",
"type": 1, "type": 1,
"api": "http://localhost:5705/vod?rule=cokemv", "api": "http://localhost:5705/vod?rule=cokemv",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_喵喵", "key": "dr_喵喵",
...@@ -27,25 +28,34 @@ ...@@ -27,25 +28,34 @@
"api": "http://localhost:5705/vod?rule=喵喵", "api": "http://localhost:5705/vod?rule=喵喵",
"searchable": 1, "searchable": 1,
"quickSearch": 1, "quickSearch": 1,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_夜空", "key": "dr_夜空",
"name": "夜空(道长)", "name": "夜空(道长)",
"type": 1, "type": 1,
"api": "http://localhost:5705/vod?rule=夜空", "api": "http://localhost:5705/vod?rule=夜空",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
},
{
"key": "dr_干饭影视",
"name": "干饭影视(道长)",
"type": 1,
"api": "http://localhost:5705/vod?rule=干饭影视",
"searchable": 0,
"quickSearch": 0,
"filterable": 0
}, },
{ {
"key": "dr_玩偶姐姐", "key": "dr_玩偶姐姐",
"name": "玩偶姐姐(道长)", "name": "玩偶姐姐(道长)",
"type": 1, "type": 1,
"api": "http://localhost:5705/vod?rule=玩偶姐姐", "api": "http://localhost:5705/vod?rule=玩偶姐姐",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_瓜皮TV", "key": "dr_瓜皮TV",
...@@ -54,16 +64,25 @@ ...@@ -54,16 +64,25 @@
"api": "http://localhost:5705/vod?rule=瓜皮TV", "api": "http://localhost:5705/vod?rule=瓜皮TV",
"searchable": 1, "searchable": 1,
"quickSearch": 1, "quickSearch": 1,
"filterable": 1 "filterable": 0
},
{
"key": "dr_看视界",
"name": "看视界(道长)",
"type": 1,
"api": "http://localhost:5705/vod?rule=看视界",
"searchable": 0,
"quickSearch": 0,
"filterable": 0
}, },
{ {
"key": "dr_莫扎兔", "key": "dr_莫扎兔",
"name": "莫扎兔(道长)", "name": "莫扎兔(道长)",
"type": 1, "type": 1,
"api": "http://localhost:5705/vod?rule=莫扎兔", "api": "http://localhost:5705/vod?rule=莫扎兔",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_蓝莓影视", "key": "dr_蓝莓影视",
...@@ -72,16 +91,16 @@ ...@@ -72,16 +91,16 @@
"api": "http://localhost:5705/vod?rule=蓝莓影视", "api": "http://localhost:5705/vod?rule=蓝莓影视",
"searchable": 1, "searchable": 1,
"quickSearch": 1, "quickSearch": 1,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_鸭奈飞", "key": "dr_鸭奈飞",
"name": "鸭奈飞(道长)", "name": "鸭奈飞(道长)",
"type": 1, "type": 1,
"api": "http://localhost:5705/vod?rule=鸭奈飞", "api": "http://localhost:5705/vod?rule=鸭奈飞",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
} }
], ],
"parses": [ "parses": [
...@@ -508,6 +527,19 @@ ...@@ -508,6 +527,19 @@
"bilibili", "bilibili",
"renrenmi" "renrenmi"
], ],
"lives": [
{
"group": "redirect",
"channels": [
{
"name": "直播",
"urls": [
"proxy://do=live&type=txt&ext=aHR0cDovL2xvY2FsaG9zdDo1NzA1L2xpdmVz"
]
}
]
}
],
"ijk": [ "ijk": [
{ {
"group": "软解码", "group": "软解码",
......
{ {
"dr_count": 9, "wallpaper": "http://192.168.10.99:5705/pics",
"dr_count": 11,
"mode": 1, "mode": 1,
"sites": [ "sites": [
{ {
"key": "dr_555影视", "key": "dr_555影视",
"name": "555影视(道长)", "name": "555影视(道长)",
"type": 1, "type": 1,
"api": "http://192.168.3.224:5705/vod?rule=555影视", "api": "http://192.168.10.99:5705/vod?rule=555影视",
"searchable": 1, "searchable": 1,
"quickSearch": 1, "quickSearch": 1,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_cokemv", "key": "dr_cokemv",
"name": "cokemv(道长)", "name": "cokemv(道长)",
"type": 1, "type": 1,
"api": "http://192.168.3.224:5705/vod?rule=cokemv", "api": "http://192.168.10.99:5705/vod?rule=cokemv",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_喵喵", "key": "dr_喵喵",
"name": "喵喵(道长)", "name": "喵喵(道长)",
"type": 1, "type": 1,
"api": "http://192.168.3.224:5705/vod?rule=喵喵", "api": "http://192.168.10.99:5705/vod?rule=喵喵",
"searchable": 1, "searchable": 1,
"quickSearch": 1, "quickSearch": 1,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_夜空", "key": "dr_夜空",
"name": "夜空(道长)", "name": "夜空(道长)",
"type": 1, "type": 1,
"api": "http://192.168.3.224:5705/vod?rule=夜空", "api": "http://192.168.10.99:5705/vod?rule=夜空",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
},
{
"key": "dr_干饭影视",
"name": "干饭影视(道长)",
"type": 1,
"api": "http://192.168.10.99:5705/vod?rule=干饭影视",
"searchable": 0,
"quickSearch": 0,
"filterable": 0
}, },
{ {
"key": "dr_玩偶姐姐", "key": "dr_玩偶姐姐",
"name": "玩偶姐姐(道长)", "name": "玩偶姐姐(道长)",
"type": 1, "type": 1,
"api": "http://192.168.3.224:5705/vod?rule=玩偶姐姐", "api": "http://192.168.10.99:5705/vod?rule=玩偶姐姐",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_瓜皮TV", "key": "dr_瓜皮TV",
"name": "瓜皮TV(道长)", "name": "瓜皮TV(道长)",
"type": 1, "type": 1,
"api": "http://192.168.3.224:5705/vod?rule=瓜皮TV", "api": "http://192.168.10.99:5705/vod?rule=瓜皮TV",
"searchable": 1, "searchable": 1,
"quickSearch": 1, "quickSearch": 1,
"filterable": 1 "filterable": 0
},
{
"key": "dr_看视界",
"name": "看视界(道长)",
"type": 1,
"api": "http://192.168.10.99:5705/vod?rule=看视界",
"searchable": 0,
"quickSearch": 0,
"filterable": 0
}, },
{ {
"key": "dr_莫扎兔", "key": "dr_莫扎兔",
"name": "莫扎兔(道长)", "name": "莫扎兔(道长)",
"type": 1, "type": 1,
"api": "http://192.168.3.224:5705/vod?rule=莫扎兔", "api": "http://192.168.10.99:5705/vod?rule=莫扎兔",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_蓝莓影视", "key": "dr_蓝莓影视",
"name": "蓝莓影视(道长)", "name": "蓝莓影视(道长)",
"type": 1, "type": 1,
"api": "http://192.168.3.224:5705/vod?rule=蓝莓影视", "api": "http://192.168.10.99:5705/vod?rule=蓝莓影视",
"searchable": 1, "searchable": 1,
"quickSearch": 1, "quickSearch": 1,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_鸭奈飞", "key": "dr_鸭奈飞",
"name": "鸭奈飞(道长)", "name": "鸭奈飞(道长)",
"type": 1, "type": 1,
"api": "http://192.168.3.224:5705/vod?rule=鸭奈飞", "api": "http://192.168.10.99:5705/vod?rule=鸭奈飞",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
} }
], ],
"parses": [ "parses": [
...@@ -508,6 +527,19 @@ ...@@ -508,6 +527,19 @@
"bilibili", "bilibili",
"renrenmi" "renrenmi"
], ],
"lives": [
{
"group": "redirect",
"channels": [
{
"name": "直播",
"urls": [
"proxy://do=live&type=txt&ext=aHR0cDovLzE5Mi4xNjguMTAuOTk6NTcwNS9saXZlcw=="
]
}
]
}
],
"ijk": [ "ijk": [
{ {
"group": "软解码", "group": "软解码",
......
{ {
"dr_count": 9, "wallpaper": "http://cms.nokia.press/pics",
"dr_count": 11,
"mode": 1, "mode": 1,
"sites": [ "sites": [
{ {
...@@ -9,16 +10,16 @@ ...@@ -9,16 +10,16 @@
"api": "http://cms.nokia.press/vod?rule=555影视", "api": "http://cms.nokia.press/vod?rule=555影视",
"searchable": 1, "searchable": 1,
"quickSearch": 1, "quickSearch": 1,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_cokemv", "key": "dr_cokemv",
"name": "cokemv(道长)", "name": "cokemv(道长)",
"type": 1, "type": 1,
"api": "http://cms.nokia.press/vod?rule=cokemv", "api": "http://cms.nokia.press/vod?rule=cokemv",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_喵喵", "key": "dr_喵喵",
...@@ -27,25 +28,34 @@ ...@@ -27,25 +28,34 @@
"api": "http://cms.nokia.press/vod?rule=喵喵", "api": "http://cms.nokia.press/vod?rule=喵喵",
"searchable": 1, "searchable": 1,
"quickSearch": 1, "quickSearch": 1,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_夜空", "key": "dr_夜空",
"name": "夜空(道长)", "name": "夜空(道长)",
"type": 1, "type": 1,
"api": "http://cms.nokia.press/vod?rule=夜空", "api": "http://cms.nokia.press/vod?rule=夜空",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
},
{
"key": "dr_干饭影视",
"name": "干饭影视(道长)",
"type": 1,
"api": "http://cms.nokia.press/vod?rule=干饭影视",
"searchable": 0,
"quickSearch": 0,
"filterable": 0
}, },
{ {
"key": "dr_玩偶姐姐", "key": "dr_玩偶姐姐",
"name": "玩偶姐姐(道长)", "name": "玩偶姐姐(道长)",
"type": 1, "type": 1,
"api": "http://cms.nokia.press/vod?rule=玩偶姐姐", "api": "http://cms.nokia.press/vod?rule=玩偶姐姐",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_瓜皮TV", "key": "dr_瓜皮TV",
...@@ -54,16 +64,25 @@ ...@@ -54,16 +64,25 @@
"api": "http://cms.nokia.press/vod?rule=瓜皮TV", "api": "http://cms.nokia.press/vod?rule=瓜皮TV",
"searchable": 1, "searchable": 1,
"quickSearch": 1, "quickSearch": 1,
"filterable": 1 "filterable": 0
},
{
"key": "dr_看视界",
"name": "看视界(道长)",
"type": 1,
"api": "http://cms.nokia.press/vod?rule=看视界",
"searchable": 0,
"quickSearch": 0,
"filterable": 0
}, },
{ {
"key": "dr_莫扎兔", "key": "dr_莫扎兔",
"name": "莫扎兔(道长)", "name": "莫扎兔(道长)",
"type": 1, "type": 1,
"api": "http://cms.nokia.press/vod?rule=莫扎兔", "api": "http://cms.nokia.press/vod?rule=莫扎兔",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_蓝莓影视", "key": "dr_蓝莓影视",
...@@ -72,16 +91,16 @@ ...@@ -72,16 +91,16 @@
"api": "http://cms.nokia.press/vod?rule=蓝莓影视", "api": "http://cms.nokia.press/vod?rule=蓝莓影视",
"searchable": 1, "searchable": 1,
"quickSearch": 1, "quickSearch": 1,
"filterable": 1 "filterable": 0
}, },
{ {
"key": "dr_鸭奈飞", "key": "dr_鸭奈飞",
"name": "鸭奈飞(道长)", "name": "鸭奈飞(道长)",
"type": 1, "type": 1,
"api": "http://cms.nokia.press/vod?rule=鸭奈飞", "api": "http://cms.nokia.press/vod?rule=鸭奈飞",
"searchable": 1, "searchable": 0,
"quickSearch": 1, "quickSearch": 0,
"filterable": 1 "filterable": 0
} }
], ],
"parses": [ "parses": [
...@@ -508,6 +527,19 @@ ...@@ -508,6 +527,19 @@
"bilibili", "bilibili",
"renrenmi" "renrenmi"
], ],
"lives": [
{
"group": "redirect",
"channels": [
{
"name": "直播",
"urls": [
"proxy://do=live&type=txt&ext=aHR0cDovL2Ntcy5ub2tpYS5wcmVzcy9saXZlcw=="
]
}
]
}
],
"ijk": [ "ijk": [
{ {
"group": "软解码", "group": "软解码",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册