feat: Implement scheduler service for automated item price and stock tracking with hybrid extraction and bot detection.

This commit is contained in:
Michael committed 2025-12-22 11:18:39 +01:00
1 parent 2fae5350b3
commit 17b3009b1d
2 files changed
+7 -5

No files matched your search

+6 -5
View File
@@ -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
+1
View File
@@ -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.