fix: resolve follow.py kwargs and profile obstacle scroll bugs

This commit is contained in:
2026-04-27 11:13:09 +02:00
parent 3c4dd84a61
commit b5cca06ce2
2 changed files with 5 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ class FollowPlugin(BehaviorPlugin):
if nav_graph.do("tap follow button"):
logger.info(f"🤝 [Follow] Followed @{ctx.username}")
ctx.session_state.add_interaction(source=ctx.username, succeed=True, followed=True, liked=False)
ctx.session_state.add_interaction(source=ctx.username, succeed=True, followed=True, scraped=False)
# Buffer for follow animations to close
sleep(random.uniform(1.8, 3.2) * ctx.sleep_mod)

View File

@@ -70,7 +70,10 @@ class ObstacleGuardPlugin(BehaviorPlugin):
return BehaviorResult(executed=True, should_skip=True) # Restart loop for same post or next
else: # SituationType.NORMAL
if "row_feed_button_like" not in xml:
nav_graph = ctx.cognitive_stack.get("nav_graph")
current_state = nav_graph.current_state if nav_graph else "Unknown"
if "row_feed_button_like" not in xml and current_state != "ProfileView":
logger.info("🧩 [ObstacleGuard] Missing feed markers. Scrolling...")
ctx.shared_state["consecutive_marker_misses"] = misses + 1
if ctx.shared_state["consecutive_marker_misses"] >= 3: