mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-24 07:38:13 +02:00
feat: Implement new product parsers for Stokomani, Auchan, Carrefour, and Gifi, and add a centralized search configuration module.
This commit is contained in:
1 parent
e0d73f4d0e
commit
b44082aeb4
5 files changed
+75
-50
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user