feat: 初始化项目并提交一次代码
This commit is contained in:
12
notify/wechat_company.py
Normal file
12
notify/wechat_company.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import httpx
|
||||
import config
|
||||
|
||||
|
||||
async def send_image(base64_str: str, md5: str):
|
||||
url = f"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={config.WECHAT_COMANY_BOT_KEY}"
|
||||
|
||||
payload = {"msgtype": "image", "image": {"base64": base64_str, "md5": md5}}
|
||||
|
||||
async with httpx.AsyncClient(timeout=10) as client:
|
||||
resp = await client.post(url, json=payload)
|
||||
resp.raise_for_status()
|
||||
Reference in New Issue
Block a user