diff --git a/main.py b/main.py index 4169a32..f704a94 100644 --- a/main.py +++ b/main.py @@ -31,7 +31,7 @@ async def main(): start_scheduler() - # await SD().push() + await SD().push() # 🔥启动FastAPI Web服务 config = uvicorn.Config("app:app", host="0.0.0.0", port=8000, reload=True) diff --git a/notify/wechat_company.py b/notify/wechat_company.py index 8473b0b..c407e1e 100644 --- a/notify/wechat_company.py +++ b/notify/wechat_company.py @@ -36,7 +36,7 @@ async def upload_file(file_path: str, filename: str = "None") -> str: resp = await client.post(url, files=files, headers=headers) resp.raise_for_status() data = resp.json() - return data.get("path", data.get("files", [None])[0]) + return data.get("data", data.get("files", [None])[0]) async def send_webhook(group_id: str, file_url: str) -> dict: @@ -52,7 +52,6 @@ async def send_webhook(group_id: str, file_url: str) -> dict: """ url = f"{config.WEBHOOK_API_URL}/webhook" headers = { - "Content-Type": "application/json", "Authorization": f"Bearer {config.WEBHOOK_API_TOKEN}", }