🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Python aiai-scrapingautomationcrawlercrawlingcrawling-pythondatadata-extractionmcpmcp-serverplaywrightpythonscrapingselectorsstealthweb-scraperweb-scrapingweb-scraping-pythonwebscrapingxpath
Fix for the `wait_selector` argument resolving to more than 1 element
Karim shoair869412761acf
diff --git a/scrapling/engines/camo.py b/scrapling/engines/camo.pyindex 596ddb9..0062ffc 100644--- a/scrapling/engines/camo.py+++ b/scrapling/engines/camo.py@@ -104,7 +104,7 @@ class CamoufoxEngine:if self.wait_selector and type(self.wait_selector) is str:waiter = page.locator(self.wait_selector)- waiter.wait_for(state=self.wait_selector_state)+ waiter.first.wait_for(state=self.wait_selector_state)content_type = res.headers.get('content-type', '')# Parse charset from content-typediff --git a/scrapling/engines/pw.py b/scrapling/engines/pw.pyindex b049090..6788078 100644--- a/scrapling/engines/pw.py+++ b/scrapling/engines/pw.py@@ -214,7 +214,7 @@ class PlaywrightEngine:if self.wait_selector and type(self.wait_selector) is str:waiter = page.locator(self.wait_selector)- waiter.wait_for(state=self.wait_selector_state)+ waiter.first.wait_for(state=self.wait_selector_state)content_type = res.headers.get('content-type', '')# Parse charset from content-type