1. 修复快手默认有头模式

This commit is contained in:
home-dev-pookz
2026-03-25 02:53:01 +08:00
parent b415613b38
commit f01ac59dea
9 changed files with 98 additions and 30 deletions
+6 -6
View File
@@ -125,9 +125,9 @@ async def check_douyin_account(account_name: str) -> bool:
return await douyin_cookie_auth(str(account_file))
async def login_kuaishou_account(account_name: str, headless: bool = True) -> bool:
async def login_kuaishou_account(account_name: str, headless: bool = True) -> dict:
account_file = resolve_account_file("kuaishou", account_name)
return await ks_setup(str(account_file), handle=True, headless=headless)
return await ks_setup(str(account_file), handle=True, return_detail=True, headless=headless)
async def check_kuaishou_account(account_name: str) -> bool:
@@ -370,10 +370,10 @@ async def dispatch(args: argparse.Namespace) -> int:
if args.platform == "kuaishou":
if args.action == "login":
success = await login_kuaishou_account(args.account, headless=args.headless)
if not success:
raise RuntimeError("Kuaishou login flow failed")
print(f"Kuaishou login flow completed: {resolve_account_file('kuaishou', args.account)}")
result = await login_kuaishou_account(args.account, headless=args.headless)
if not result["success"]:
raise RuntimeError(result["message"])
print(f"Kuaishou login flow completed: {result['account_file']}")
return 0
if args.action == "check":