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

fix(Proxy Rotation): Fix an MRO issue

Karim shoairf614651a9791
diff --git a/scrapling/engines/_browsers/_base.py b/scrapling/engines/_browsers/_base.py
index 16a995d..eefb9f3 100644
--- a/scrapling/engines/_browsers/_base.py
+++ b/scrapling/engines/_browsers/_base.py
@@ -48,9 +48,8 @@ from scrapling.engines.constants import STEALTH_ARGS, HARMFUL_ARGS, DEFAULT_ARGS
class SyncSession:
_config: "PlaywrightConfig | StealthConfig"
_context_options: Dict[str, Any]
-
- def _build_context_with_proxy(self, proxy: Optional[ProxyType] = None) -> Dict[str, Any]:
- raise NotImplementedError # pragma: no cover
+ if TYPE_CHECKING:
+ _build_context_with_proxy: Callable[..., Dict[str, Any]]
def __init__(self, max_pages: int = 1):
self.max_pages = max_pages
@@ -216,9 +215,8 @@ class SyncSession:
class AsyncSession:
_config: "PlaywrightConfig | StealthConfig"
_context_options: Dict[str, Any]
-
- def _build_context_with_proxy(self, proxy: Optional[ProxyType] = None) -> Dict[str, Any]:
- raise NotImplementedError # pragma: no cover
+ if TYPE_CHECKING:
+ _build_context_with_proxy: Callable[..., Dict[str, Any]]
def __init__(self, max_pages: int = 1):
self.max_pages = max_pages