Commit Graph
552 Commits
Author SHA1 Message Date
LogiFlow 5e377e5d30 Merge pull request #192 from R0m1k3/antigravity
feat: Implement improved search service with persistent browser and m…
2025-11-30 22:21:33 +01:00
Michael 4720ed6b93 feat: Implement improved search service with persistent browser and modular site-specific parsers, including Gifi. 2025-11-30 22:21:08 +01:00
LogiFlow 1ead73f367 Merge pull request #191 from R0m1k3/antigravity
Antigravity
2025-11-30 22:04:43 +01:00
Michael 64067347d1 feat: implement new search service with multiple site parsers, search configuration, and supporting inspection/verification scripts. 2025-11-30 22:04:14 +01:00
Michael 95e38287cb feat: Add new parsers for Auchan, Carrefour, L'Incroyable, and Stokomani, including search configuration and deployment updates. 2025-11-30 22:03:40 +01:00
LogiFlow 430321dfe2 Merge pull request #190 from R0m1k3/antigravity
feat: Implement new product parsers for Stokomani, Auchan, Carrefour,…
2025-11-30 20:26:45 +01:00
Michael b44082aeb4 feat: Implement new product parsers for Stokomani, Auchan, Carrefour, and Gifi, and add a centralized search configuration module. 2025-11-30 20:26:19 +01:00
LogiFlow 8a011f8a7c Merge pull request #189 from R0m1k3/antigravity
feat: add LaFoirFouille parser to extract product search results from…
2025-11-30 19:09:24 +01:00
Michael e0d73f4d0e feat: add LaFoirFouille parser to extract product search results from lafoirfouille.fr 2025-11-30 19:09:09 +01:00
LogiFlow e3974c25cc Merge pull request #188 from R0m1k3/antigravity
feat: Add initial parser for Auchan.fr to extract product search resu…
2025-11-30 19:06:08 +01:00
Michael fbd06cfb17 feat: Add initial parser for Auchan.fr to extract product search results. 2025-11-30 19:05:38 +01:00
LogiFlow 4b6468a3bd Merge pull request #187 from R0m1k3/antigravity
feat: Add abstract base parser with product result dataclass and impl…
2025-11-30 19:03:52 +01:00
Michael 078060f155 feat: Add abstract base parser with product result dataclass and implement Stokomani parser for search results. 2025-11-30 19:03:26 +01:00
LogiFlow 388ce85a95 Merge pull request #186 from R0m1k3/antigravity
feat: add Stokomani parser to extract product search results from sto…
2025-11-30 18:17:28 +01:00
Michael ebe685fdf9 feat: add Stokomani parser to extract product search results from stokomani.fr 2025-11-30 18:17:07 +01:00
LogiFlow 5436b206df Merge pull request #185 from R0m1k3/antigravity
feat: Add Stokomani search results parser
2025-11-30 18:13:34 +01:00
Michael b3d5c56707 feat: Add Stokomani search results parser 2025-11-30 18:13:11 +01:00
LogiFlow 668784ca14 Merge pull request #184 from R0m1k3/antigravity
feat: Implement improved search service with centralized configuratio…
2025-11-30 18:06:05 +01:00
Michael c2f042beee feat: Implement improved search service with centralized configuration and site-specific parsers for various retailers. 2025-11-30 18:05:34 +01:00
LogiFlow 3d894ff740 Merge pull request #183 from R0m1k3/antigravity
feat: Add improved search service with persistent browser connection …
2025-11-30 17:42:50 +01:00
Michael a8bffaec08 feat: Implement initial e-commerce site parsers with a base class and factory for extracting product search results. 2025-11-30 17:42:32 +01:00
Michael ee13a0bccd fix: resolve merge conflict in improved_search_service - unified domain matching logic 2025-11-30 17:37:16 +01:00
Michael 3db7db48fa feat: Add improved search service with persistent browser connection for e-commerce scraping. 2025-11-30 17:32:58 +01:00
LogiFlow 338c79857c Merge pull request #182 from R0m1k3/claude/rebuild-search-amazon-01LBnzN1wfNMe1EG9HcpMCdK
Claude/rebuild search amazon 01 l bnz n1wf n me1 eg9 hcp m cd k
2025-11-30 17:26:53 +01:00
Claude 43ea314e41 fix: Improve Fnac image extraction and add Shopify fallbacks
Fixes two issues:

**1. Fnac - No Images Displayed**
Problem: FnacParser only searched for images in parent container,
missing images nested directly in the link element.

Solution: Two-priority search
- PRIORITY 1: Search in link element first (picture, img)
- PRIORITY 2: Search in parent container
- Added warning log when no image found
- Ensures parent is always defined before use

**2. L'Incroyable - 0 Products (Shopify sites)**
Problem: GenericParser fallbacks didn't include Shopify patterns.
L'Incroyable uses Shopify structure with /products/ URLs.

Solution: Added Shopify-specific fallbacks
- a[href*='/products/'] (Shopify product URLs)
- a.product-card__link (Shopify class)
- a[href*='/collections/'] (Shopify collections)
- li[class*='product'] a (list-based layouts)

**Fallback Order (now 17 selectors):**
1. Product URL patterns (Shopify, generic)
2. Semantic classes (article, .product-card)
3. Shopify-specific selectors
4. Generic structure patterns
5. Last resort wildcards

**Expected Impact:**
- ✅ Fnac images should now display
- ✅ L'Incroyable should find products (Shopify)
- ✅ Better coverage of Shopify-based stores
2025-11-30 16:25:30 +00:00
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
Claude aa9e8dc427 fix: Handle punctuation differences in site domain matching
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.
2025-11-30 16:19:06 +00:00
LogiFlow 5ea56d6c9e Merge pull request #181 from R0m1k3/claude/rebuild-search-amazon-01LBnzN1wfNMe1EG9HcpMCdK
fix: Improve site mapping and relax GenericParser filtering
2025-11-30 17:14:45 +01:00
Claude eef4f60e49 fix: Improve site mapping and relax GenericParser filtering
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.
2025-11-30 16:13:59 +00:00
LogiFlow bb49af255b Merge pull request #180 from R0m1k3/claude/rebuild-search-amazon-01LBnzN1wfNMe1EG9HcpMCdK
feat: Rebuild search system with modular, site-specific parsers
2025-11-30 17:09:42 +01:00
Claude d2c492ff5c feat: Rebuild search system with modular, site-specific parsers
Complete refactoring of the search module for robustness and reliability:

**New Architecture:**
- Modular parser system with specialized parsers for each major site
- Factory pattern for automatic parser selection
- Generic fallback parser for sites without specific implementation

**Specialized Parsers:**
- ✅ Amazon.fr - Robust parser with multiple fallback selectors
  - Handles sponsored products, Prime eligibility, ratings, reviews
  - Based on proven amazon_scraper_v2.py implementation
- ✅ Cdiscount.com - Optimized for Cdiscount's HTML structure
- ✅ Fnac.com - Handles Fnac's picture elements and article structure
- ✅ Darty.com - Specialized for electronics retailer
- ✅ Boulanger.com - Optimized for Boulanger's product cards

**Key Features:**
- Multiple fallback selectors for each element (title, price, image)
- Proper price parsing for French format (1 234,56 €)
- Rating and review count extraction
- Stock status detection
- Image URL extraction with multiple attribute fallbacks
- Query filtering to ensure relevant results

**Benefits:**
- Much more robust than previous generic parsing
- Easier to maintain (one parser per site)
- Easily extensible (add new parser for new site)
- Better error handling and logging
- Higher success rate for product extraction

**Updated Services:**
- improved_search_service.py now uses ParserFactory
- Legacy _parse_results marked as deprecated
- Conversion layer between ProductResult and SearchResult

This implements the Amazon France model across all major sites
for consistent, reliable product search results.
2025-11-30 16:09:05 +00:00
LogiFlow 548de46d2b Merge pull request #179 from R0m1k3/antigravity
feat: add `search_config` module for browserless, proxy, user agent, …
2025-11-30 16:58:10 +01:00
Michael 33d9042b10 feat: add search_config module for browserless, proxy, user agent, and site-specific search configurations, and create list_missing_sites script. 2025-11-30 16:57:44 +01:00
LogiFlow 6d1bce71aa Merge pull request #178 from R0m1k3/antigravity
feat: Implement new search service with comprehensive configuration f…
2025-11-30 16:37:12 +01:00
Michael 7ba8850838 feat: Implement new search service with comprehensive configuration for various e-commerce sites, proxies, and user agents. 2025-11-30 16:36:51 +01:00
LogiFlow b3bedc9777 Merge pull request #177 from R0m1k3/antigravity
feat: introduce core search configuration for sites, proxies, and use…
2025-11-30 16:27:32 +01:00
Michael f20bae52bd feat: introduce core search configuration for sites, proxies, and user agents, alongside selector diagnosis and HTML dumping utilities. 2025-11-30 16:27:02 +01:00
LogiFlow 8d75f52f2d Merge pull request #176 from R0m1k3/antigravity
feat: Implement centralized search configuration with site definition…
2025-11-30 16:03:47 +01:00
Michael 79dc4bfafc feat: Implement centralized search configuration with site definitions, proxy settings, and user agents, and add a debugging script. 2025-11-30 15:58:27 +01:00
LogiFlow a187959e57 Merge pull request #175 from R0m1k3/antigravity
Antigravity
2025-11-30 15:03:26 +01:00
Michael 7477d505e5 feat: Add ImprovedSearchService for persistent browser-based web scraping using Playwright. 2025-11-30 15:03:03 +01:00
Michael 510904d899 feat: Add Amazon product scraping service using Playwright and Browserless for persistent browser connections. 2025-11-30 14:56:01 +01:00
LogiFlow bf51d128b3 Merge pull request #174 from R0m1k3/antigravity
Antigravity
2025-11-30 14:46:49 +01:00
Michael 66d6f14d13 Merge branch 'antigravity' of https://github.com/R0m1k3/Priceflow into antigravity 2025-11-30 14:46:22 +01:00
Michael e9f6c6e0be feat: Add BrowserlessService for persistent, auto-reconnecting browser operations with enhanced price and content extraction. 2025-11-30 14:46:21 +01:00
LogiFlow 00fff0e163 Merge pull request #173 from R0m1k3/main
tes
2025-11-30 14:28:20 +01:00
LogiFlow 45538afee2 Merge pull request #172 from R0m1k3/antigravity
feat: add `search_config` module centralizing site definitions, proxy…
2025-11-30 14:16:02 +01:00
Michael 3813173e01 feat: add search_config module centralizing site definitions, proxy settings, user agents, and cookie banner selectors. 2025-11-30 14:14:31 +01:00
LogiFlow fb9b98787d Merge pull request #171 from R0m1k3/antigravity
Antigravity
2025-11-30 13:25:41 +01:00
Michael b8a56ca85d Merge branch 'antigravity' of https://github.com/R0m1k3/Priceflow into antigravity 2025-11-30 13:25:15 +01:00