diff --git a/src/change_url/change_url.py b/src/change_url/change_url.py index c2056f6..398cc38 100644 --- a/src/change_url/change_url.py +++ b/src/change_url/change_url.py @@ -63,6 +63,15 @@ def get_url_mapping(urls_with_context, template_type): "kyApp": categories.get("全站", [""])[0], "kyTyApp": categories.get("体育", [""])[0], } + elif template_type == 'ly': # ly模板 + url_mapping = { + "lyWeb": categories.get("WEB", [""])[0], + "lyFljWeb": categories.get("WEB", ["", ""])[1], + "lyH5": categories.get("H5", [""])[0], + "lyFljH5": categories.get("H5", ["", ""])[1], + "lyApp": categories.get("全站", [""])[0], + "lyTyApp": categories.get("体育", [""])[0], + } elif template_type == 'jy': # jy模板 url_mapping = { "jyWeb": categories.get("WEB", [""])[0], @@ -107,7 +116,9 @@ def get_url_type(text, url_list): 'ky': '开云', 'hth': '华体会', 'jy': '九游', - 'aty': '爱体育' + 'aty': '爱体育', + 'ly': '乐鱼' + } for url_type, keyword in keywords.items(): @@ -135,6 +146,8 @@ def check_urls(url_list): return 'jy', '马甲包' in content elif '爱体育' in content: return 'aty', '马甲包' in content + elif '乐鱼' in content: + return 'ly', '马甲包' in content except requests.RequestException: logger.debug(f"URL '{url}' 不可用,跳过。") @@ -168,7 +181,8 @@ const codes = { 'hth': '3016341', 'ky': '97238304', 'jy': '90413847', - 'aty': '123456' + 'aty': '123456', + 'ly': '888888', }; const links = { @@ -186,7 +200,16 @@ const links = { 'kyFljWeb': 'https://www.qpiao.vip:9006/register?i_code='+codes['ky'], 'kyFljH5': 'https://www.7ig4jf.com:8443/entry/register?i_code='+codes['ky'], -}, + }, + 'ly': { + 'lyWeb': 'https://www.2ezmig.com:9501/register?i_code='+codes['ly'], + 'lyH5': 'https://www.u3hnhg.com:9970/entry/register?i_code='+codes['ly'], + 'lyApp': 'https://www.1wpeq.vip:8663/?i_code='+codes['ly'], + 'lyTyApp': 'https://www.3djjf.vip:9512/?i_code='+codes['ly'], + 'lyFljWeb': 'https://www.qpiao.vip:9006/register?i_code='+codes['ly'], + 'lyFljH5': 'https://www.7ig4jf.com:8443/entry/register?i_code='+codes['ly'], + + }, 'jy': { 'jyWeb': 'https://www.1wv3jq.com:9008/register/?i_code='+codes['jy'], 'jyH5': 'https://www.1j5voy.vip:9113/entry/register?i_code='+codes['jy'], diff --git a/src/change_url/start.sh b/src/change_url/start.sh index f5b5c86..3ec20b3 100644 --- a/src/change_url/start.sh +++ b/src/change_url/start.sh @@ -1,11 +1,10 @@ - #!/bin/sh # 启动 change_url_bot.py 脚本 python /app/change_url_bot.py & # 启动 FastAPI 应用 -uvicorn app:app --host 127.0.0.1 --port 8080 & +uvicorn app:app --host 0.0.0.0 --port 8080 & # 等待所有后台进程结束 wait diff --git a/src/core/Dockerfile b/src/core/Dockerfile index ebbc676..bcdec25 100644 --- a/src/core/Dockerfile +++ b/src/core/Dockerfile @@ -20,6 +20,8 @@ COPY ./health_check.sh . # 确保健康检查脚本有执行权限 RUN chmod +x /app/health_check.sh +sed -i 's/\r$//' health_check.sh + # 设置环境变量 ENV RABBITMQ_USER=bot ENV RABBITMQ_PASSWORD=xiaomi@123