From 17b3009b1dfb258b4494c78dcc6649e3ea4a49cc Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Mon, 22 Dec 2025 11:18:39 +0100 Subject: [PATCH] feat: Implement scheduler service for automated item price and stock tracking with hybrid extraction and bot detection. --- app/services/scheduler_service.py | 11 ++++++----- task.md | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/services/scheduler_service.py b/app/services/scheduler_service.py index 8e67e8d..bd1a529 100644 --- a/app/services/scheduler_service.py +++ b/app/services/scheduler_service.py @@ -177,11 +177,12 @@ async def process_item_check(item_id: int): logger.debug(f"JSON-LD extraction failed: {e}") # 2. Try AIPriceExtractor (Text AI - Gemma 3) - Very reliable for search - from app.services.ai_price_extractor import AIPriceExtractor - if price is None: - price = await AIPriceExtractor.extract_price(html_content, item_data["name"]) - if price: - logger.info(f"AIPriceExtractor (Text) found price: {price}€") + # DISABLED FOR VISION PRIORITY (User Request: Option 2) + # from app.services.ai_price_extractor import AIPriceExtractor + # if price is None: + # price = await AIPriceExtractor.extract_price(html_content, item_data["name"]) + # if price: + # logger.info(f"AIPriceExtractor (Text) found price: {price}€") # 3. Fallback/Verification with AIService (Vision AI - Gemini) extraction = None diff --git a/task.md b/task.md index b6f1fb2..e0a187e 100644 --- a/task.md +++ b/task.md @@ -14,3 +14,4 @@ - **2025-12-22**: Initialized task. Confirmed current system is *already* sending images, but likely confusing the AI with conflicting text data. - **2025-12-22**: User selected **Option 2 (Vision Priority)**. Proceeding to rewrite AI System Prompt. +- **2025-12-22**: **FIX**: Detected that `scheduler_service.py` was prioritizing a text-only extractor (0.99€ found in text) before checking the image. Disabled the text-only extractor to force Vision AI usage.