From b5cca06ce24d40cef8dc06b011281ea864fe19ef Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 27 Apr 2026 11:13:09 +0200 Subject: [PATCH] fix: resolve follow.py kwargs and profile obstacle scroll bugs --- GramAddict/core/behaviors/follow.py | 2 +- GramAddict/core/behaviors/obstacle_guard.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/GramAddict/core/behaviors/follow.py b/GramAddict/core/behaviors/follow.py index 3592f3f..0a73089 100644 --- a/GramAddict/core/behaviors/follow.py +++ b/GramAddict/core/behaviors/follow.py @@ -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) diff --git a/GramAddict/core/behaviors/obstacle_guard.py b/GramAddict/core/behaviors/obstacle_guard.py index 422fb8c..c0fbc9d 100644 --- a/GramAddict/core/behaviors/obstacle_guard.py +++ b/GramAddict/core/behaviors/obstacle_guard.py @@ -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: