fix(Proxy Rotation): Fix an MRO issue
The stub shadows the real implementation, and proxy rotation always hits NotImplementedError. Possible fix for #215 Co-Authored-By: Yuval Dinodia <102706514+yetval@users.noreply.github.com>
This commit is contained in:
@@ -48,9 +48,8 @@ from scrapling.engines.constants import STEALTH_ARGS, HARMFUL_ARGS, DEFAULT_ARGS
|
|||||||
class SyncSession:
|
class SyncSession:
|
||||||
_config: "PlaywrightConfig | StealthConfig"
|
_config: "PlaywrightConfig | StealthConfig"
|
||||||
_context_options: Dict[str, Any]
|
_context_options: Dict[str, Any]
|
||||||
|
if TYPE_CHECKING:
|
||||||
def _build_context_with_proxy(self, proxy: Optional[ProxyType] = None) -> Dict[str, Any]:
|
_build_context_with_proxy: Callable[..., Dict[str, Any]]
|
||||||
raise NotImplementedError # pragma: no cover
|
|
||||||
|
|
||||||
def __init__(self, max_pages: int = 1):
|
def __init__(self, max_pages: int = 1):
|
||||||
self.max_pages = max_pages
|
self.max_pages = max_pages
|
||||||
@@ -216,9 +215,8 @@ class SyncSession:
|
|||||||
class AsyncSession:
|
class AsyncSession:
|
||||||
_config: "PlaywrightConfig | StealthConfig"
|
_config: "PlaywrightConfig | StealthConfig"
|
||||||
_context_options: Dict[str, Any]
|
_context_options: Dict[str, Any]
|
||||||
|
if TYPE_CHECKING:
|
||||||
def _build_context_with_proxy(self, proxy: Optional[ProxyType] = None) -> Dict[str, Any]:
|
_build_context_with_proxy: Callable[..., Dict[str, Any]]
|
||||||
raise NotImplementedError # pragma: no cover
|
|
||||||
|
|
||||||
def __init__(self, max_pages: int = 1):
|
def __init__(self, max_pages: int = 1):
|
||||||
self.max_pages = max_pages
|
self.max_pages = max_pages
|
||||||
|
|||||||
Reference in New Issue
Block a user