File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,13 @@ class SentimentParams(TypedDict):
12
12
"""
13
13
14
14
15
+ class SentimentSentenceResult (TypedDict ):
16
+ score : float
17
+ emotion : str
18
+ text : str
19
+ sentiment : str
20
+
21
+
15
22
class SentimentResult (TypedDict ):
16
23
emotion : str
17
24
"""
@@ -25,6 +32,7 @@ class SentimentResult(TypedDict):
25
32
"""
26
33
The score of the sentiment.
27
34
"""
35
+ sentences : List [SentimentSentenceResult ]
28
36
29
37
30
38
class SentimentResponse (TypedDict ):
Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ class AIScrapeParams(TypedDict):
70
70
goto_options : NotRequired [object ]
71
71
wait_for : NotRequired [object ]
72
72
cookies : NotRequired [object ]
73
+ page_position : NotRequired [int ]
74
+ root_element_selector : NotRequired [str ]
73
75
74
76
75
77
class ScrapeParams (TypedDict ):
@@ -97,6 +99,18 @@ class ScrapeResponse(TypedDict):
97
99
data : Any
98
100
99
101
102
+ class AIScrapeResponse (TypedDict ):
103
+ success : bool
104
+ """
105
+ Indicates whether the translation was successful.
106
+ """
107
+ data : List [object ]
108
+ context : object
109
+ page_position_length : int
110
+ page_position : int
111
+ selectors : object
112
+
113
+
100
114
class Web (ClientConfig ):
101
115
102
116
config : RequestConfig
@@ -114,7 +128,7 @@ def __init__(
114
128
disable_request_logging = disable_request_logging ,
115
129
)
116
130
117
- def ai_scrape (self , params : AIScrapeParams ) -> ScrapeResponse :
131
+ def ai_scrape (self , params : AIScrapeParams ) -> AIScrapeResponse :
118
132
path = "/ai/scrape"
119
133
resp = Request (
120
134
config = self .config ,
Original file line number Diff line number Diff line change 6
6
7
7
setup (
8
8
name = "jigsawstack" ,
9
- version = "0.1.16 " ,
9
+ version = "0.1.17 " ,
10
10
description = "JigsawStack Python SDK" ,
11
11
long_description = open ("README.md" , encoding = "utf8" ).read (),
12
12
long_description_content_type = "text/markdown" ,
You can’t perform that action at this time.
0 commit comments