From 0d16f9b2512b9f8050804d68072d9a29bc5690f1 Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Tue, 30 Aug 2022 15:01:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E7=9B=B4=E6=92=AD=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E8=BF=9B=E8=A1=8Cbase64=E7=BC=96=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E5=8E=9F=E7=89=88tv=5Fbox=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 10 ++--- templates/config.txt | 2 +- txt/pycms0.json | 72 +++++++++++++++++++++++++---------- txt/pycms1.json | 90 ++++++++++++++++++++++++++++++-------------- txt/pycms2.json | 72 +++++++++++++++++++++++++---------- 5 files changed, 171 insertions(+), 75 deletions(-) diff --git a/app.py b/app.py index 83da3d3..b3e7ecf 100644 --- a/app.py +++ b/app.py @@ -4,7 +4,7 @@ # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------ # Date : 2022/8/25 import random - +from utils.encode import base64Encode import js2py from flask_sqlalchemy import SQLAlchemy import config @@ -289,7 +289,7 @@ def config_render(mode): if mode == 1: jyw_ip = getHost(mode) 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.headers['Content-Type'] = 'application/json; charset=utf-8' return response @@ -312,9 +312,9 @@ def config_gen(): # 生成文件 os.makedirs('txt',exist_ok=True) jxs=getJxs() - set_local = render_template('config.txt',rules=getRules('js'),mode=0,host=getHost(0),jxs=jxs) - set_area = render_template('config.txt',rules=getRules('js'),mode=1,host=getHost(1),jxs=jxs) - set_online = render_template('config.txt',rules=getRules('js'),mode=1,host=getHost(2),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'),base64Encode=base64Encode,mode=1,host=getHost(1),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: set_dict = json.loads(set_local) f.write(json.dumps(set_dict,ensure_ascii=False,indent=4)) diff --git a/templates/config.txt b/templates/config.txt index 547cc5e..e62d66a 100644 --- a/templates/config.txt +++ b/templates/config.txt @@ -48,7 +48,7 @@ }{% if loop.last==False %},{% endif %}{% endfor %} ], "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": [{ "group": "软解码", "options": [{ diff --git a/txt/pycms0.json b/txt/pycms0.json index e061097..77535b1 100644 --- a/txt/pycms0.json +++ b/txt/pycms0.json @@ -1,5 +1,6 @@ { - "dr_count": 9, + "wallpaper": "http://localhost:5705/pics", + "dr_count": 11, "mode": 0, "sites": [ { @@ -9,16 +10,16 @@ "api": "http://localhost:5705/vod?rule=555影视", "searchable": 1, "quickSearch": 1, - "filterable": 1 + "filterable": 0 }, { "key": "dr_cokemv", "name": "cokemv(道长)", "type": 1, "api": "http://localhost:5705/vod?rule=cokemv", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "searchable": 0, + "quickSearch": 0, + "filterable": 0 }, { "key": "dr_喵喵", @@ -27,25 +28,34 @@ "api": "http://localhost:5705/vod?rule=喵喵", "searchable": 1, "quickSearch": 1, - "filterable": 1 + "filterable": 0 }, { "key": "dr_夜空", "name": "夜空(道长)", "type": 1, "api": "http://localhost:5705/vod?rule=夜空", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "searchable": 0, + "quickSearch": 0, + "filterable": 0 + }, + { + "key": "dr_干饭影视", + "name": "干饭影视(道长)", + "type": 1, + "api": "http://localhost:5705/vod?rule=干饭影视", + "searchable": 0, + "quickSearch": 0, + "filterable": 0 }, { "key": "dr_玩偶姐姐", "name": "玩偶姐姐(道长)", "type": 1, "api": "http://localhost:5705/vod?rule=玩偶姐姐", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "searchable": 0, + "quickSearch": 0, + "filterable": 0 }, { "key": "dr_瓜皮TV", @@ -54,16 +64,25 @@ "api": "http://localhost:5705/vod?rule=瓜皮TV", "searchable": 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_莫扎兔", "name": "莫扎兔(道长)", "type": 1, "api": "http://localhost:5705/vod?rule=莫扎兔", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "searchable": 0, + "quickSearch": 0, + "filterable": 0 }, { "key": "dr_蓝莓影视", @@ -72,16 +91,16 @@ "api": "http://localhost:5705/vod?rule=蓝莓影视", "searchable": 1, "quickSearch": 1, - "filterable": 1 + "filterable": 0 }, { "key": "dr_鸭奈飞", "name": "鸭奈飞(道长)", "type": 1, "api": "http://localhost:5705/vod?rule=鸭奈飞", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "searchable": 0, + "quickSearch": 0, + "filterable": 0 } ], "parses": [ @@ -508,6 +527,19 @@ "bilibili", "renrenmi" ], + "lives": [ + { + "group": "redirect", + "channels": [ + { + "name": "直播", + "urls": [ + "proxy://do=live&type=txt&ext=aHR0cDovL2xvY2FsaG9zdDo1NzA1L2xpdmVz" + ] + } + ] + } + ], "ijk": [ { "group": "软解码", diff --git a/txt/pycms1.json b/txt/pycms1.json index 6ce5ffe..66d6e23 100644 --- a/txt/pycms1.json +++ b/txt/pycms1.json @@ -1,87 +1,106 @@ { - "dr_count": 9, + "wallpaper": "http://192.168.10.99:5705/pics", + "dr_count": 11, "mode": 1, "sites": [ { "key": "dr_555影视", "name": "555影视(道长)", "type": 1, - "api": "http://192.168.3.224:5705/vod?rule=555影视", + "api": "http://192.168.10.99:5705/vod?rule=555影视", "searchable": 1, "quickSearch": 1, - "filterable": 1 + "filterable": 0 }, { "key": "dr_cokemv", "name": "cokemv(道长)", "type": 1, - "api": "http://192.168.3.224:5705/vod?rule=cokemv", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "api": "http://192.168.10.99:5705/vod?rule=cokemv", + "searchable": 0, + "quickSearch": 0, + "filterable": 0 }, { "key": "dr_喵喵", "name": "喵喵(道长)", "type": 1, - "api": "http://192.168.3.224:5705/vod?rule=喵喵", + "api": "http://192.168.10.99:5705/vod?rule=喵喵", "searchable": 1, "quickSearch": 1, - "filterable": 1 + "filterable": 0 }, { "key": "dr_夜空", "name": "夜空(道长)", "type": 1, - "api": "http://192.168.3.224:5705/vod?rule=夜空", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "api": "http://192.168.10.99:5705/vod?rule=夜空", + "searchable": 0, + "quickSearch": 0, + "filterable": 0 + }, + { + "key": "dr_干饭影视", + "name": "干饭影视(道长)", + "type": 1, + "api": "http://192.168.10.99:5705/vod?rule=干饭影视", + "searchable": 0, + "quickSearch": 0, + "filterable": 0 }, { "key": "dr_玩偶姐姐", "name": "玩偶姐姐(道长)", "type": 1, - "api": "http://192.168.3.224:5705/vod?rule=玩偶姐姐", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "api": "http://192.168.10.99:5705/vod?rule=玩偶姐姐", + "searchable": 0, + "quickSearch": 0, + "filterable": 0 }, { "key": "dr_瓜皮TV", "name": "瓜皮TV(道长)", "type": 1, - "api": "http://192.168.3.224:5705/vod?rule=瓜皮TV", + "api": "http://192.168.10.99:5705/vod?rule=瓜皮TV", "searchable": 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_莫扎兔", "name": "莫扎兔(道长)", "type": 1, - "api": "http://192.168.3.224:5705/vod?rule=莫扎兔", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "api": "http://192.168.10.99:5705/vod?rule=莫扎兔", + "searchable": 0, + "quickSearch": 0, + "filterable": 0 }, { "key": "dr_蓝莓影视", "name": "蓝莓影视(道长)", "type": 1, - "api": "http://192.168.3.224:5705/vod?rule=蓝莓影视", + "api": "http://192.168.10.99:5705/vod?rule=蓝莓影视", "searchable": 1, "quickSearch": 1, - "filterable": 1 + "filterable": 0 }, { "key": "dr_鸭奈飞", "name": "鸭奈飞(道长)", "type": 1, - "api": "http://192.168.3.224:5705/vod?rule=鸭奈飞", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "api": "http://192.168.10.99:5705/vod?rule=鸭奈飞", + "searchable": 0, + "quickSearch": 0, + "filterable": 0 } ], "parses": [ @@ -508,6 +527,19 @@ "bilibili", "renrenmi" ], + "lives": [ + { + "group": "redirect", + "channels": [ + { + "name": "直播", + "urls": [ + "proxy://do=live&type=txt&ext=aHR0cDovLzE5Mi4xNjguMTAuOTk6NTcwNS9saXZlcw==" + ] + } + ] + } + ], "ijk": [ { "group": "软解码", diff --git a/txt/pycms2.json b/txt/pycms2.json index dadcb36..bef3874 100644 --- a/txt/pycms2.json +++ b/txt/pycms2.json @@ -1,5 +1,6 @@ { - "dr_count": 9, + "wallpaper": "http://cms.nokia.press/pics", + "dr_count": 11, "mode": 1, "sites": [ { @@ -9,16 +10,16 @@ "api": "http://cms.nokia.press/vod?rule=555影视", "searchable": 1, "quickSearch": 1, - "filterable": 1 + "filterable": 0 }, { "key": "dr_cokemv", "name": "cokemv(道长)", "type": 1, "api": "http://cms.nokia.press/vod?rule=cokemv", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "searchable": 0, + "quickSearch": 0, + "filterable": 0 }, { "key": "dr_喵喵", @@ -27,25 +28,34 @@ "api": "http://cms.nokia.press/vod?rule=喵喵", "searchable": 1, "quickSearch": 1, - "filterable": 1 + "filterable": 0 }, { "key": "dr_夜空", "name": "夜空(道长)", "type": 1, "api": "http://cms.nokia.press/vod?rule=夜空", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "searchable": 0, + "quickSearch": 0, + "filterable": 0 + }, + { + "key": "dr_干饭影视", + "name": "干饭影视(道长)", + "type": 1, + "api": "http://cms.nokia.press/vod?rule=干饭影视", + "searchable": 0, + "quickSearch": 0, + "filterable": 0 }, { "key": "dr_玩偶姐姐", "name": "玩偶姐姐(道长)", "type": 1, "api": "http://cms.nokia.press/vod?rule=玩偶姐姐", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "searchable": 0, + "quickSearch": 0, + "filterable": 0 }, { "key": "dr_瓜皮TV", @@ -54,16 +64,25 @@ "api": "http://cms.nokia.press/vod?rule=瓜皮TV", "searchable": 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_莫扎兔", "name": "莫扎兔(道长)", "type": 1, "api": "http://cms.nokia.press/vod?rule=莫扎兔", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "searchable": 0, + "quickSearch": 0, + "filterable": 0 }, { "key": "dr_蓝莓影视", @@ -72,16 +91,16 @@ "api": "http://cms.nokia.press/vod?rule=蓝莓影视", "searchable": 1, "quickSearch": 1, - "filterable": 1 + "filterable": 0 }, { "key": "dr_鸭奈飞", "name": "鸭奈飞(道长)", "type": 1, "api": "http://cms.nokia.press/vod?rule=鸭奈飞", - "searchable": 1, - "quickSearch": 1, - "filterable": 1 + "searchable": 0, + "quickSearch": 0, + "filterable": 0 } ], "parses": [ @@ -508,6 +527,19 @@ "bilibili", "renrenmi" ], + "lives": [ + { + "group": "redirect", + "channels": [ + { + "name": "直播", + "urls": [ + "proxy://do=live&type=txt&ext=aHR0cDovL2Ntcy5ub2tpYS5wcmVzcy9saXZlcw==" + ] + } + ] + } + ], "ijk": [ { "group": "软解码", -- GitLab