fix(maizone_refactored): 修复获取cookie时响应为空导致的错误

This commit is contained in:
tt-P607
2025-08-26 12:11:08 +08:00
parent e5d6b6979b
commit 1ca365168a

View File

@@ -58,7 +58,7 @@ class CookieService:
else:
response = await send_api.adapter_command_to_stream(action="get_cookies", params=params, platform="qq", timeout=40.0)
if response.get("status") == "ok":
if response and response.get("status") == "ok":
cookie_str = response.get("data", {}).get("cookies", "")
if cookie_str:
return {k.strip(): v.strip() for k, v in (p.split('=', 1) for p in cookie_str.split('; ') if '=' in p)}