🕷️ 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
Covering more parts in StealthyFetcher tests
Karim shoair4d9a494e3511
diff --git a/tests/fetchers/test_camoufox.py b/tests/fetchers/test_camoufox.pyindex 0a75c09..5a0fe17 100644--- a/tests/fetchers/test_camoufox.py+++ b/tests/fetchers/test_camoufox.py@@ -36,6 +36,7 @@ class TestStealthyFetcher(unittest.TestCase):def test_waiting_selector(self):"""Test if waiting for a selector make page does not finish loading or not"""self.assertEqual(self.fetcher.fetch(self.html_url, wait_selector='h1').status, 200)+ self.assertEqual(self.fetcher.fetch(self.html_url, wait_selector='h1', wait_selector_state='visible').status, 200)def test_cookies_loading(self):"""Test if cookies are set after the request"""@@ -56,6 +57,7 @@ class TestStealthyFetcher(unittest.TestCase):self.assertEqual(self.fetcher.fetch(self.html_url, block_webrtc=True, allow_webgl=True).status, 200)self.assertEqual(self.fetcher.fetch(self.html_url, block_webrtc=False, allow_webgl=True).status, 200)self.assertEqual(self.fetcher.fetch(self.html_url, block_webrtc=True, allow_webgl=False).status, 200)+ self.assertEqual(self.fetcher.fetch(self.html_url, extra_headers={'ayo': ''}, os_randomize=True).status, 200)def test_infinite_timeout(self):"""Test if infinite timeout breaks the code or not"""