🕷️ 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
test: correcting tests with the new arguments
Karim shoair33c5633c5883
diff --git a/tests/fetchers/async/test_dynamic.py b/tests/fetchers/async/test_dynamic.pyindex 0d46365..3fe38cc 100644--- a/tests/fetchers/async/test_dynamic.py+++ b/tests/fetchers/async/test_dynamic.py@@ -53,10 +53,7 @@ class TestDynamicFetcherAsync:@pytest.mark.parametrize("kwargs",[- {"disable_webgl": True, "hide_canvas": False},- {"disable_webgl": False, "hide_canvas": True, "disable_resources": True},- {"stealth": True}, # causes issues with GitHub Actions- {"stealth": True, "real_chrome": True}, # causes issues with GitHub Actions+ {"real_chrome": True, "disable_resources": True},{"wait_selector": "h1", "wait_selector_state": "attached"},{"wait_selector": "h1", "wait_selector_state": "visible"},{diff --git a/tests/fetchers/async/test_dynamic_session.py b/tests/fetchers/async/test_dynamic_session.pyindex 234854c..c403017 100644--- a/tests/fetchers/async/test_dynamic_session.py+++ b/tests/fetchers/async/test_dynamic_session.py@@ -71,7 +71,6 @@ class TestAsyncDynamicSession:"""Test AsyncDynamicSession with various options"""async with AsyncDynamicSession(headless=False,- stealth=True,disable_resources=True,extra_headers={"X-Test": "value"}) as session:diff --git a/tests/fetchers/async/test_requests_session.py b/tests/fetchers/async/test_requests_session.pyindex c4e1355..3846e69 100644--- a/tests/fetchers/async/test_requests_session.py+++ b/tests/fetchers/async/test_requests_session.py@@ -1,4 +1,3 @@-import pytestfrom scrapling.engines.static import AsyncFetcherClientdiff --git a/tests/fetchers/async/test_stealth.py b/tests/fetchers/async/test_stealth.pyindex b3296b4..bba39d8 100644--- a/tests/fetchers/async/test_stealth.py+++ b/tests/fetchers/async/test_stealth.py@@ -1,4 +1,3 @@-from playwright._impl._errors import TimeoutErrorimport pytestimport pytest_httpbin@@ -55,10 +54,9 @@ class TestStealthyFetcher:@pytest.mark.parametrize("kwargs",[- {"block_webrtc": True, "allow_webgl": True, "disable_ads": False},- {"block_webrtc": False, "allow_webgl": True, "block_images": True},+ {"block_webrtc": True, "allow_webgl": True},+ {"block_webrtc": False, "allow_webgl": True},{"block_webrtc": True, "allow_webgl": False, "disable_resources": True},- {"block_images": True, "disable_resources": True, },{"wait_selector": "h1", "wait_selector_state": "attached"},{"wait_selector": "h1", "wait_selector_state": "visible"},{@@ -67,9 +65,6 @@ class TestStealthyFetcher:"cookies": [{"name": "test", "value": "123", "domain": "example.com", "path": "/"}],"google_search": True,"extra_headers": {"ayo": ""},- "os_randomize": True,- "disable_ads": True,- # "geoip": True,"selector_config": {"keep_comments": False, "keep_cdata": False},"additional_args": {},},diff --git a/tests/fetchers/async/test_stealth_session.py b/tests/fetchers/async/test_stealth_session.pyindex 05f7953..140742d 100644--- a/tests/fetchers/async/test_stealth_session.py+++ b/tests/fetchers/async/test_stealth_session.py@@ -72,9 +72,8 @@ class TestAsyncStealthySession:"""Test AsyncStealthySession with various options"""async with AsyncStealthySession(max_pages=1,- block_images=True,- disable_ads=True,- humanize=True+ block_webrtc=True,+ allow_webgl=True) as session:response = await session.fetch(urls["html"])assert response.status == 200diff --git a/tests/fetchers/sync/test_dynamic.py b/tests/fetchers/sync/test_dynamic.pyindex e044e33..cac8a73 100644--- a/tests/fetchers/sync/test_dynamic.py+++ b/tests/fetchers/sync/test_dynamic.py@@ -51,10 +51,7 @@ class TestDynamicFetcher:@pytest.mark.parametrize("kwargs",[- {"disable_webgl": True, "hide_canvas": False},- {"disable_webgl": False, "hide_canvas": True, "disable_resources": True},- {"stealth": True}, # causes issues with GitHub Actions- {"stealth": True, "real_chrome": True}, # causes issues with GitHub Actions+ {"disable_resources": True, "real_chrome": True},{"wait_selector": "h1", "wait_selector_state": "attached"},{"wait_selector": "h1", "wait_selector_state": "visible"},{