From 87da5e94902c2dd57330c95585fc409ab9cbc181 Mon Sep 17 00:00:00 2001 From: Nubenetes Bot Date: Sat, 16 May 2026 12:06:48 +0200 Subject: [PATCH] fix(cleaning): final fix for indentation and string literal syntax in description enrichment --- src/intelligent_health_checker.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/intelligent_health_checker.py b/src/intelligent_health_checker.py index b309ee8b..2535b2fa 100644 --- a/src/intelligent_health_checker.py +++ b/src/intelligent_health_checker.py @@ -191,7 +191,7 @@ class IntelligentLinkCleaner: except: pass return url, True, None, "Conservative Keep" - async def _enrich_description_if_needed(self, url: str): + async def _enrich_description_if_needed(self, url: str): """ Policy Update: We NO LONGER enrich existing V1 descriptions in the repo to respect manual curation. However, we ensure the INVENTORY has a @@ -210,12 +210,10 @@ class IntelligentLinkCleaner: web_content = await _deep_fetch_content(url) if not web_content: return - prompt = ( - f"Analyze this resource: {url}\n" - f"Technical Content Snippet: {web_content[:1500]}\n" - "Provide: 1) A professional 1-sentence English description. 2) The precise original PUBLICATION DATE (YYYY-MM-DD or YYYY if possible).\n" - "Format: JSON: {\"desc\": \"...\", \"pub_date\": \"...\"}" - ) + prompt = f"""Analyze this resource: {url} +Technical Content Snippet: {web_content[:1500]} +Provide: 1) A professional 1-sentence English description. 2) The precise original PUBLICATION DATE (YYYY-MM-DD or YYYY if possible). +Format: JSON: {\"desc\": \"...\", \"pub_date\": \"...\"}""" ai_data = await call_gemini_with_retry(prompt) if ai_data: self.inventory[norm_url]["ai_summary"] = ai_data.get("desc", "").strip()