mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-15 11:17:06 +02:00
Fixes two critical issues preventing some sites from working: **1. Site Mapping Bug (E.Leclerc, La Foir'Fouille not searching)** - Previous mapping logic was too strict: `if key in domain or domain in key` - E.Leclerc in DB as "leclerc.com" didn't match config key "e-leclerc.com" - La Foir'Fouille similar issues Solution: Multi-strategy matching - Normalize domains (remove www., lowercase) - Try exact match first - Try substring match - Try without prefixes (e-, la-) - Log warnings for unmatched sites **2. GenericParser Over-Filtering (Stokomani: 48 links → 0 products)** - Previous filter required at least one query word in title - Too strict: filtered valid products with different wording Solution: Very relaxed filtering - Keep products with matching query words - ALSO keep products with substantial titles (>15 chars) even without match - Only filter very short titles (<15 chars) without query match - Added debug logging to track filtering decisions **Additional Improvements:** - Added detailed logging for title extraction - Better visibility of why products are filtered/kept - Helps diagnose future parser issues These changes should significantly improve product discovery across all sites using GenericParser.