feat: Implement new product parsers for Stokomani, Auchan, Carrefour, and Gifi, and add a centralized search configuration module.

This commit is contained in:
Michael committed 2025-11-30 20:26:19 +01:00
1 parent e0d73f4d0e
commit b44082aeb4
5 files changed
+75 -50

No files matched your search

+7 -5
View File
@@ -27,12 +27,14 @@ class GifiParser(BaseParser):
href = link_el.get('href')
url = self.make_absolute_url(href)
title = link_el.get_text(strip=True)
# Title: Try specific classes first to avoid getting rating text etc.
title = None
title_el = product.select_one(".pdp-link > a, .link, [class*='name'], [class*='title']")
if title_el:
title = title_el.get_text(strip=True)
if not title:
# Try finding title in nested elements
title_el = product.select_one("[class*='name'], [class*='title']")
if title_el:
title = title_el.get_text(strip=True)
title = link_el.get_text(strip=True)
if not title:
continue