feat: add Stokomani parser to extract product search results from stokomani.fr

This commit is contained in:
Michael committed 2025-11-30 18:17:07 +01:00
1 parent b3d5c56707
commit ebe685fdf9
1 file changed
+6
+6
View File
@@ -38,6 +38,12 @@ class StokomaniParser(BaseParser):
img_url = None img_url = None
prev_a = link.find_previous_sibling("a", attrs={"aria-label": True}) prev_a = link.find_previous_sibling("a", attrs={"aria-label": True})
if prev_a and prev_a.get('href') == href: if prev_a and prev_a.get('href') == href:
# Try specific selector first
img_el = prev_a.select_one("motion-element img, img")
if img_el:
img_url = self._get_image_src(img_el)
if not img_url:
img_url = self.extract_image_url(prev_a) img_url = self.extract_image_url(prev_a)
# Price: Look for text node after the link # Price: Look for text node after the link