Skip to content

🕷️ 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

StealthFetcher - Add the option to allow webgl in the browser

Karim shoaire7300ecba0dc
diff --git a/scrapling/engines/camo.py b/scrapling/engines/camo.py
index eebdf51..9e20914 100644
--- a/scrapling/engines/camo.py
+++ b/scrapling/engines/camo.py
@@ -17,6 +17,7 @@ class CamoufoxEngine:
self, headless: Union[bool, str] = True,
block_images: Optional[bool] = False,
block_webrtc: Optional[bool] = False,
+ allow_webgl: Optional[bool] = False,
network_idle: Optional[bool] = False,
timeout: Optional[float] = 30000,
page_action: Callable = do_nothing,
@@ -27,6 +28,7 @@ class CamoufoxEngine:
self.headless = headless
self.block_images = bool(block_images)
self.block_webrtc = bool(block_webrtc)
+ self.allow_webgl = bool(allow_webgl)
self.network_idle = bool(network_idle)
self.timeout = check_type_validity(timeout, [int, float], 30000)
if callable(page_action):
@@ -45,6 +47,7 @@ class CamoufoxEngine:
block_images=self.block_images, # Careful! it makes some websites doesn't finish loading at all like stackoverflow even in headful
os=get_os_name(),
block_webrtc=self.block_webrtc,
+ allow_webgl=self.allow_webgl,
) as browser:
page = browser.new_page()
page.set_default_navigation_timeout(self.timeout)