mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-12 01:39:25 +02:00
Critical fix for E.Leclerc and similar sites where DB domain differs from config key by punctuation (. vs -). **Problem:** - DB contains: "e.leclerc" (with dot) - Config key: "e-leclerc.com" (with dash) - Previous matching failed: no match found **Solution:** Enhanced matching with 5-level strategy: 1. **Exact match** - as before 2. **Normalized punctuation match** (NEW) - Remove all `-` and `.` from both sides - Compare: "e.leclerc" → "eleclerc", "e-leclerc.com" → "eleclecrcom" - Use contains logic: "eleclerc" in "eleclecrcom" → ✅ MATCH 3. **Contains match** - with original punctuation 4. **Prefix removal** - now handles both "e-" and "e." (plus "la-", "la.") 5. **Fuzzy core match** - last resort for edge cases **Impact:** - ✅ E.Leclerc now matches correctly - ✅ La Foir'Fouille handles variations - ✅ Any site with punctuation differences works - ✅ Backward compatible with existing matches **Debug logging:** All strategies log which method matched, making issues easy to diagnose.