fix: update the cookies type hint for the mcp server

This commit is contained in:
Karim shoair
2025-12-28 00:08:44 +02:00
parent a4ad6b5fce
commit 1b838eabd0
2 changed files with 9 additions and 7 deletions
+8 -6
View File
@@ -17,13 +17,15 @@ from scrapling.fetchers import (
from scrapling.core._types import ( from scrapling.core._types import (
Optional, Optional,
Tuple, Tuple,
extraction_types,
Mapping, Mapping,
Dict, Dict,
List, List,
Any, Any,
SelectorWaitStates,
Generator, Generator,
Sequence,
SetCookieParam,
extraction_types,
SelectorWaitStates,
) )
@@ -224,7 +226,7 @@ class ScraplingMCPServer:
timeout: int | float = 30000, timeout: int | float = 30000,
disable_resources: bool = False, disable_resources: bool = False,
wait_selector: Optional[str] = None, wait_selector: Optional[str] = None,
cookies: Optional[List[Dict]] = None, cookies: Sequence[SetCookieParam] | None = None,
network_idle: bool = False, network_idle: bool = False,
wait_selector_state: SelectorWaitStates = "attached", wait_selector_state: SelectorWaitStates = "attached",
) -> ResponseModel: ) -> ResponseModel:
@@ -307,7 +309,7 @@ class ScraplingMCPServer:
timeout: int | float = 30000, timeout: int | float = 30000,
disable_resources: bool = False, disable_resources: bool = False,
wait_selector: Optional[str] = None, wait_selector: Optional[str] = None,
cookies: Optional[List[Dict]] = None, cookies: Sequence[SetCookieParam] | None = None,
network_idle: bool = False, network_idle: bool = False,
wait_selector_state: SelectorWaitStates = "attached", wait_selector_state: SelectorWaitStates = "attached",
) -> List[ResponseModel]: ) -> List[ResponseModel]:
@@ -396,7 +398,7 @@ class ScraplingMCPServer:
timeout: int | float = 30000, timeout: int | float = 30000,
disable_resources: bool = False, disable_resources: bool = False,
wait_selector: Optional[str] = None, wait_selector: Optional[str] = None,
cookies: Optional[List[Dict]] = None, cookies: Sequence[SetCookieParam] | None = None,
network_idle: bool = False, network_idle: bool = False,
wait_selector_state: SelectorWaitStates = "attached", wait_selector_state: SelectorWaitStates = "attached",
block_webrtc: bool = False, block_webrtc: bool = False,
@@ -494,7 +496,7 @@ class ScraplingMCPServer:
timeout: int | float = 30000, timeout: int | float = 30000,
disable_resources: bool = False, disable_resources: bool = False,
wait_selector: Optional[str] = None, wait_selector: Optional[str] = None,
cookies: Optional[List[Dict]] = None, cookies: Sequence[SetCookieParam] | None = None,
network_idle: bool = False, network_idle: bool = False,
wait_selector_state: SelectorWaitStates = "attached", wait_selector_state: SelectorWaitStates = "attached",
block_webrtc: bool = False, block_webrtc: bool = False,
+1 -1
View File
@@ -62,7 +62,7 @@ if TYPE_CHECKING: # pragma: no cover
load_dom: bool load_dom: bool
wait_selector: Optional[str] wait_selector: Optional[str]
wait_selector_state: SelectorWaitStates wait_selector_state: SelectorWaitStates
cookies: Sequence[SetCookieParam] cookies: Sequence[SetCookieParam] | None
google_search: bool google_search: bool
wait: int | float wait: int | float
timezone_id: str | None timezone_id: str | None