mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-22 22:58:11 +02:00
feat: add Bonial.fr catalog scraper service using Playwright.
This commit is contained in:
1 parent
1fc0c6e69e
commit
a7aefb3e56
1 file changed
+1
-1
@@ -201,7 +201,7 @@ async def scrape_catalog_list(page: Page, enseigne: Enseigne) -> list[dict[str,
|
|||||||
# Go up to find a section/div that contains both the link and the title/image
|
# Go up to find a section/div that contains both the link and the title/image
|
||||||
parent = link
|
parent = link
|
||||||
for _ in range(5): # Try going up max 5 levels
|
for _ in range(5): # Try going up max 5 levels
|
||||||
parent = await parent.evaluateHandle("el => el.parentElement")
|
parent = await parent.evaluate_handle("el => el.parentElement")
|
||||||
parent = parent.as_element()
|
parent = parent.as_element()
|
||||||
if not parent:
|
if not parent:
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in new issue
Block a user