mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
更新飞书 bot 验证过程,兼容新状态码 (#2302)
This commit is contained in:
+1
-1
@@ -224,7 +224,7 @@ def feishu_bot(title: str, content: str, **kwargs) -> None:
|
||||
data = {"msg_type": "text", "content": {"text": f"{title}\n\n{content}"}}
|
||||
response = requests.post(url, data=json.dumps(data)).json()
|
||||
|
||||
if response.get("StatusCode") == 0:
|
||||
if response.get("StatusCode") == 0 or response.get("code") == 0:
|
||||
print("飞书 推送成功!")
|
||||
else:
|
||||
print("飞书 推送失败!错误信息如下:\n", response)
|
||||
|
||||
Reference in New Issue
Block a user