mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-24 07:16:08 +08:00
iGot自定义参数
This commit is contained in:
parent
e083eaad93
commit
239ab821c3
|
@ -284,16 +284,16 @@ def gotify(title: str, content: str, **kwargs) -> None:
|
||||||
print("gotify 推送失败!")
|
print("gotify 推送失败!")
|
||||||
|
|
||||||
|
|
||||||
def iGot(title: str, content: str) -> None:
|
def iGot(title: str, content: str, **kwargs) -> None:
|
||||||
"""
|
"""
|
||||||
使用 iGot 推送消息。
|
使用 iGot 推送消息。
|
||||||
"""
|
"""
|
||||||
if not push_config.get("IGOT_PUSH_KEY"):
|
if not (kwargs.get("IGOT_PUSH_KEY") or push_config.get("IGOT_PUSH_KEY")):
|
||||||
print("iGot 服务的 IGOT_PUSH_KEY 未设置!!\n取消推送")
|
print("iGot 服务的 IGOT_PUSH_KEY 未设置!!\n取消推送")
|
||||||
return
|
return
|
||||||
print("iGot 服务启动")
|
print("iGot 服务启动")
|
||||||
|
IGOT_PUSH_KEY = kwargs.get("IGOT_PUSH_KEY", push_config.get("IGOT_PUSH_KEY"))
|
||||||
url = f'https://push.hellyw.com/{push_config.get("IGOT_PUSH_KEY")}'
|
url = f'https://push.hellyw.com/{IGOT_PUSH_KEY}'
|
||||||
data = {"title": title, "content": content}
|
data = {"title": title, "content": content}
|
||||||
headers = {"Content-Type": "application/x-www-form-urlencoded"}
|
headers = {"Content-Type": "application/x-www-form-urlencoded"}
|
||||||
response = requests.post(url, data=data, headers=headers).json()
|
response = requests.post(url, data=data, headers=headers).json()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user