diff --git a/GramAddict/core/bot_flow.py b/GramAddict/core/bot_flow.py index 980d2ef..b460000 100644 --- a/GramAddict/core/bot_flow.py +++ b/GramAddict/core/bot_flow.py @@ -177,6 +177,11 @@ def start_bot(**kwargs): ) persona_interests = [p.strip() for p in persona_raw.split(",") if p.strip()] if persona_raw else [] + global_goal = getattr(configs.args, "goal", None) + if global_goal: + persona_interests.insert(0, global_goal) + logger.info(f"🎯 [Autonomous Directive] Overriding target audience with high-level goal: {global_goal}", extra={"color": f"{Style.BRIGHT}{Fore.GREEN}"}) + from GramAddict.core.interaction import LLMWriter from GramAddict.core.qdrant_memory import DMMemoryDB, ParasocialCRMDB from GramAddict.core.resonance_engine import ResonanceEngine diff --git a/GramAddict/core/perception/feed_analysis.py b/GramAddict/core/perception/feed_analysis.py index 2912fe5..e522f45 100644 --- a/GramAddict/core/perception/feed_analysis.py +++ b/GramAddict/core/perception/feed_analysis.py @@ -63,7 +63,7 @@ def extract_post_content(context_xml: str, device=None) -> dict: # 1. Learn/extract post author dynamically author_node = telepath.find_best_node( - context_xml, "post author username header", min_confidence=0.75, device=device + context_xml, "post author username text (exclude bottom tabs)", min_confidence=0.75, device=device ) # 🛡️ Anti-Hallucination Guard: Ensure we actually found text. @@ -71,7 +71,9 @@ def extract_post_content(context_xml: str, device=None) -> dict: result["username"] = author_node["original_attribs"]["text"].strip() # 2. Learn/extract post media description dynamically - media_node = telepath.find_best_node(context_xml, "post media content", min_confidence=0.35, device=device) + media_node = telepath.find_best_node( + context_xml, "post media content (the actual image or video, exclude bottom tabs)", min_confidence=0.35, device=device + ) if media_node and media_node.get("original_attribs", {}).get("desc"): result["description"] = media_node["original_attribs"]["desc"].strip() diff --git a/GramAddict/core/physics/timing.py b/GramAddict/core/physics/timing.py index 861d424..174ee79 100644 --- a/GramAddict/core/physics/timing.py +++ b/GramAddict/core/physics/timing.py @@ -152,8 +152,6 @@ def align_active_post(device): try: xml = device.dump_hierarchy() if "clips_video_container" in xml or "clips_viewer_container" in xml: - import logging - logger = logging.getLogger(__name__) logger.info("🎯 [Alignment] Reels view detected. Auto-snapping is native.") return True