Commit Graph
2 Commits
Author SHA1 Message Date
Claude f2d45f9566 fix: Improve AI product price extraction for French e-commerce sites
Three critical fixes to resolve AI extraction returning null prices with 0.0 confidence:

1. **Add French price/stock keywords** (app/utils/text.py)
   - Added € symbol and French price patterns (12,99 €, 1 234,56 €)
   - Added French keywords: prix, coût, promotion, réduction
   - Added French stock keywords: ajouter au panier, en stock, rupture, épuisé
   - Previously only detected $ and English keywords

2. **Enable full-page screenshots** (app/services/browserless_service.py)
   - Changed full_page=False to full_page=True
   - Now captures entire page instead of viewport-only
   - Prevents missing prices located below the fold

3. **Increase image resolution** (app/utils/image.py)
   - Increased MAX_IMAGE_SIZE from 1024px to 2048px
   - Preserves fine details in price text for better AI recognition
   - Improves readability on dense product pages

These changes fix the issue where AI models returned:
{"price": null, "price_confidence": 0.0, "in_stock": null, "in_stock_confidence": 0.0}

Tested with Amazon.fr product monitoring.
2025-11-29 19:07:04 +00:00
LogiFlow afed10abc5 Add files via upload 2025-11-22 10:01:25 +01:00