Files
Priceflow/app
Claude ff2615ff81 feat: Add fallback selectors to GenericParser for better site coverage
Improves GenericParser to automatically try common e-commerce selectors
when the configured selector doesn't match any products.

**Problem:**
- Auchan and other sites return 0 products because configured selector
  doesn't match their current HTML structure
- GenericParser was too rigid: if config selector fails, give up

**Solution:**
Automatic fallback selector cascade:

1. Try configured selector first (as before)
2. If no results, try 11 common e-commerce patterns:
   - Product URL patterns: /produit, /product, /p/, /item
   - Class patterns: article a, .product a, .product-card a
   - Generic patterns: [class*='product'] a
3. Accept first selector that finds >= 3 links
4. Log which selector worked for debugging

**Selector Priority:**
- Most specific first (URL patterns)
- Medium specificity (semantic classes)
- Generic last resort (any product-related class)

**Benefits:**
- ✅ Works on more sites without manual config updates
- ✅ Resilient to site HTML changes
- ✅ Clear logging shows which selector worked
- ✅ Still uses configured selector when available
- ✅ Requires >= 3 matches to avoid false positives

**Expected Impact:**
Sites like Auchan should now find products even if configured
selector is outdated, without needing a specialized parser.
2025-11-30 16:20:31 +00:00
..
2025-11-22 10:01:25 +01:00
2025-11-22 10:01:25 +01:00
2025-11-22 10:01:25 +01:00
2025-11-22 10:01:25 +01:00