diff --git a/app.py b/app.py index 83da3d3373d294fcb9998b87ad36b5da092bfffb..b3e7ecfa2c63da2bc49b40fd61e97647737dfdbc 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 547cc5e67517617d32854473c938cba222e89311..e62d66ae69c43aef4582668cb1a66eba269cbc42 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 e061097fb1a5f901eaaa5ee871313bccfd7995a9..77535b1d6adb4ca5a21aacea62915d854cf70764 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 6ce5ffe943c95c8c2f93f8ce9acf5c83f904cc61..66d6e23201c645adad7999c12557b33407fb1bd2 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 dadcb360849d8f259469e2b8237ca78baf789e54..bef3874b84772bb51e28ed5d2ec76c8eb7399ede 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": "软解码",