write agent.py
This commit is contained in:
4
agent.py
4
agent.py
@@ -386,10 +386,10 @@ class SeleniumbaseWebsiteScraper(A2AAgent[SeleniumbaseWebsiteScraperConfig, NoAu
|
|||||||
saved_paths.extend(run.get("saved_paths") or [])
|
saved_paths.extend(run.get("saved_paths") or [])
|
||||||
|
|
||||||
if status in {"challenge_detected", "manual_intervention_required", "blocked", "blocked_by_robots_txt", "browser_runtime_unavailable"}:
|
if status in {"challenge_detected", "manual_intervention_required", "blocked", "blocked_by_robots_txt", "browser_runtime_unavailable"}:
|
||||||
warnings.append(f"iteration {iteration} stopped due to status={status}")
|
warnings.append(f"step {step} stopped due to status={status}")
|
||||||
break
|
break
|
||||||
if len(all_items) >= int(min_items):
|
if len(all_items) >= int(min_items):
|
||||||
decisions.append({"iteration": iteration, "action": "stop", "reason": "min_items reached", "confidence": 1.0})
|
decisions.append({"step": step, "action": "stop", "reason": "min_items reached", "confidence": 1.0})
|
||||||
break
|
break
|
||||||
|
|
||||||
# Ask planner what to do next
|
# Ask planner what to do next
|
||||||
|
|||||||
Reference in New Issue
Block a user