mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-11 17:29:14 +02:00
feat: add Stokomani parser to extract product search results from stokomani.fr
This commit is contained in:
1 parent
b3d5c56707
commit
ebe685fdf9
1 file changed
+7
-1
@@ -38,7 +38,13 @@ class StokomaniParser(BaseParser):
|
||||
img_url = None
|
||||
prev_a = link.find_previous_sibling("a", attrs={"aria-label": True})
|
||||
if prev_a and prev_a.get('href') == href:
|
||||
img_url = self.extract_image_url(prev_a)
|
||||
# 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)
|
||||
|
||||
# Price: Look for text node after the link
|
||||
price = None
|
||||
|
||||
Reference in new issue
Block a user