Skip to content

Commit 1f9a03c

Browse files
Merge pull request #51 from JigsawStack/feat/ai-scrape-response
removed proxy from response
2 parents e850c9e + 46107ff commit 1f9a03c

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

jigsawstack/web.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,18 @@ class WaitFor(TypedDict):
9393
value: Union[str, int]
9494

9595

96-
class AdvanceConfig(TypedDict):
96+
class AdvanceConfigRequest(TypedDict):
9797
console: bool
9898
network: bool
9999
cookies: bool
100100

101101

102+
class AdvanceConfigResponse(TypedDict):
103+
console: list
104+
network: list
105+
cookies: list
106+
107+
102108
class BYOProxyAuth(TypedDict):
103109
username: str
104110
password: str
@@ -117,7 +123,7 @@ class BaseAIScrapeParams(TypedDict):
117123
reject_request_pattern: NotRequired[List[str]]
118124
goto_options: NotRequired[GotoOptions]
119125
wait_for: NotRequired[WaitFor]
120-
advance_config: NotRequired[AdvanceConfig]
126+
advance_config: NotRequired[AdvanceConfigRequest]
121127
size_preset: NotRequired[str]
122128
is_mobile: NotRequired[bool]
123129
scale: NotRequired[int]
@@ -164,13 +170,22 @@ class Link(TypedDict):
164170
type: Literal["a", "img"]
165171

166172

173+
class Meta(TypedDict):
174+
title: Optional[str]
175+
description: Optional[str]
176+
keywords: Optional[str]
177+
og_image: Optional[str]
178+
179+
167180
class AIScrapeResponse(TypedDict):
168181
success: bool
169182
data: List[DataItem]
170183
page_position: int
171184
page_position_length: int
172-
context: Dict[str, List[str]]
185+
advance_config: Optional[AdvanceConfigResponse]
186+
context: Any
173187
selectors: Dict[str, List[str]]
188+
meta: Optional[Meta]
174189
link: List[Link]
175190

176191

0 commit comments

Comments
 (0)