fix: баги

This commit is contained in:
protokey committed 2026-09-09 16:22:53 +04:00
1 parent ec2dca2529
commit 7b85b99ba4
2 files changed
+4 -2

No files matched your search

+2
View File
@@ -44,4 +44,6 @@ async def execute(page: Page, actions: list[ActionRequest]) -> list[str]:
except Exception as e: except Exception as e:
actions_result.append({"type": act.type, "ok": "false", "error": str(e)}) actions_result.append({"type": act.type, "ok": "false", "error": str(e)})
break break
else:
actions_result.append({"type": act.type, "ok": "true"})
return actions_result return actions_result
+2 -2
View File
@@ -38,7 +38,7 @@ async def solve(request: Request, payload: SolveRequest):
actions_result = await actions.execute(page, payload.actions) actions_result = await actions.execute(page, payload.actions)
status = not "error" in actions_result[-1] status = not "error" in actions_result[-1]
error = ["Something error", None][status] error = ["Something error", None][status]
cookies = await camoufo.cookies() # cookies = await camoufo.cookies()
html = await page.inner_html('html') html = await page.inner_html('html')
await page.screenshot( await page.screenshot(
path=( path=(
@@ -49,7 +49,7 @@ async def solve(request: Request, payload: SolveRequest):
return { return {
"status": ["err", "ok"][status], "status": ["err", "ok"][status],
"html": html, "html": html,
"cookies": cookies, # "cookies": cookies,
"actions": actions_result, "actions": actions_result,
"error": error, "error": error,
} }