通知 TG_API_HOST 参数移除默认 https 协议,参数包含协议

This commit is contained in:
whyour
2023-12-01 09:21:27 +08:00
parent 5afec03548
commit 897b710527
4 changed files with 88 additions and 87 deletions
+1 -1
View File
@@ -534,7 +534,7 @@ def telegram_bot(title: str, content: str) -> None:
print("tg 服务启动")
if push_config.get("TG_API_HOST"):
url = f"https://{push_config.get('TG_API_HOST')}/bot{push_config.get('TG_BOT_TOKEN')}/sendMessage"
url = f"{push_config.get('TG_API_HOST')}/bot{push_config.get('TG_BOT_TOKEN')}/sendMessage"
else:
url = (
f"https://api.telegram.org/bot{push_config.get('TG_BOT_TOKEN')}/sendMessage"