File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,13 @@ class SentimentParams(TypedDict):
1212 """
1313
1414
15+ class SentimentSentenceResult (TypedDict ):
16+ score : float
17+ emotion : str
18+ text : str
19+ sentiment : str
20+
21+
1522class SentimentResult (TypedDict ):
1623 emotion : str
1724 """
@@ -25,6 +32,7 @@ class SentimentResult(TypedDict):
2532 """
2633 The score of the sentiment.
2734 """
35+ sentences : List [SentimentSentenceResult ]
2836
2937
3038class SentimentResponse (TypedDict ):
Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ class AIScrapeParams(TypedDict):
7070 goto_options : NotRequired [object ]
7171 wait_for : NotRequired [object ]
7272 cookies : NotRequired [object ]
73+ page_position : NotRequired [int ]
74+ root_element_selector : NotRequired [str ]
7375
7476
7577class ScrapeParams (TypedDict ):
@@ -97,6 +99,18 @@ class ScrapeResponse(TypedDict):
9799 data : Any
98100
99101
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+
100114class Web (ClientConfig ):
101115
102116 config : RequestConfig
@@ -114,7 +128,7 @@ def __init__(
114128 disable_request_logging = disable_request_logging ,
115129 )
116130
117- def ai_scrape (self , params : AIScrapeParams ) -> ScrapeResponse :
131+ def ai_scrape (self , params : AIScrapeParams ) -> AIScrapeResponse :
118132 path = "/ai/scrape"
119133 resp = Request (
120134 config = self .config ,
You can’t perform that action at this time.
0 commit comments