dataify-sdk 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,63 @@
1
+ """Facebook scraper tools.
2
+
3
+ Wraps Facebook-related MCP tools: post, profile, comment, and event.
4
+
5
+ Auto-generated. Regenerate with: python scripts/codegen.py
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from typing import Any
11
+
12
+ from pydantic import BaseModel, Field
13
+
14
+
15
+ class _FBBase(BaseModel):
16
+ file_name: str | None = Field(default="{{TasksID}}", description="Builder file_name")
17
+
18
+
19
+ class ScrapeFacebookPostParams(_FBBase):
20
+ """Parameters for ``scrape_facebook_post`` — Facebook 帖子采集。"""
21
+ url: str = Field(..., description="Facebook 帖子 URL")
22
+
23
+
24
+ class ScrapeFacebookProfileParams(_FBBase):
25
+ """Parameters for ``scrape_facebook_profile`` — Facebook 用户信息采集。"""
26
+ url: str = Field(..., description="Facebook 用户主页 URL")
27
+
28
+
29
+ class ScrapeFacebookCommentParams(_FBBase):
30
+ """Parameters for ``scrape_facebook_comment`` — Facebook 评论采集。"""
31
+ url: str = Field(..., description="Facebook 帖子 URL")
32
+
33
+
34
+ class ScrapeFacebookEventParams(_FBBase):
35
+ """Parameters for ``scrape_facebook_event`` — Facebook 活动采集。"""
36
+ url: str = Field(..., description="Facebook 活动 URL")
37
+
38
+
39
+ async def scrape_facebook_post(self, params: ScrapeFacebookPostParams | None = None) -> Any:
40
+ arguments = params.model_dump(exclude_none=True) if params else {}
41
+ return await self.call_tool("scrape_facebook_post", arguments)
42
+
43
+
44
+ async def scrape_facebook_profile(self, params: ScrapeFacebookProfileParams | None = None) -> Any:
45
+ arguments = params.model_dump(exclude_none=True) if params else {}
46
+ return await self.call_tool("scrape_facebook_profile", arguments)
47
+
48
+
49
+ async def scrape_facebook_comment(self, params: ScrapeFacebookCommentParams | None = None) -> Any:
50
+ arguments = params.model_dump(exclude_none=True) if params else {}
51
+ return await self.call_tool("scrape_facebook_comment", arguments)
52
+
53
+
54
+ async def scrape_facebook_event(self, params: ScrapeFacebookEventParams | None = None) -> Any:
55
+ arguments = params.model_dump(exclude_none=True) if params else {}
56
+ return await self.call_tool("scrape_facebook_event", arguments)
57
+
58
+
59
+ def _attach(client_cls: type) -> None:
60
+ client_cls.scrape_facebook_post = scrape_facebook_post
61
+ client_cls.scrape_facebook_profile = scrape_facebook_profile
62
+ client_cls.scrape_facebook_comment = scrape_facebook_comment
63
+ client_cls.scrape_facebook_event = scrape_facebook_event
@@ -0,0 +1,41 @@
1
+ """Glassdoor scraper tools.
2
+
3
+ Wraps Glassdoor MCP tools: company and job listings.
4
+
5
+ Auto-generated. Regenerate with: python scripts/codegen.py
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from typing import Any
11
+
12
+ from pydantic import BaseModel, Field
13
+
14
+
15
+ class _GlassdoorBase(BaseModel):
16
+ file_name: str | None = Field(default="{{TasksID}}", description="Builder file_name")
17
+
18
+
19
+ class ScrapeGlassdoorCompanyParams(_GlassdoorBase):
20
+ """Parameters for ``scrape_glassdoor_company`` — Glassdoor 公司信息采集。"""
21
+ url: str = Field(..., description="Glassdoor 公司页面 URL")
22
+
23
+
24
+ class ScrapeGlassdoorJobListingsParams(_GlassdoorBase):
25
+ """Parameters for ``scrape_glassdoor_job_listings`` — Glassdoor 职位列表采集。"""
26
+ url: str = Field(..., description="Glassdoor 职位搜索 URL")
27
+
28
+
29
+ async def scrape_glassdoor_company(self, params: ScrapeGlassdoorCompanyParams | None = None) -> Any:
30
+ arguments = params.model_dump(exclude_none=True) if params else {}
31
+ return await self.call_tool("scrape_glassdoor_company", arguments)
32
+
33
+
34
+ async def scrape_glassdoor_job_listings(self, params: ScrapeGlassdoorJobListingsParams | None = None) -> Any:
35
+ arguments = params.model_dump(exclude_none=True) if params else {}
36
+ return await self.call_tool("scrape_glassdoor_job_listings", arguments)
37
+
38
+
39
+ def _attach(client_cls: type) -> None:
40
+ client_cls.scrape_glassdoor_company = scrape_glassdoor_company
41
+ client_cls.scrape_glassdoor_job_listings = scrape_glassdoor_job_listings
@@ -0,0 +1,121 @@
1
+ """Google scraper tools.
2
+
3
+ Wraps MCP tools that scrape specific Google properties via the
4
+ Scraper Builder API (maps details, map comments, shopping info, etc.).
5
+
6
+ Auto-generated. Regenerate with: python scripts/codegen.py
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ from typing import Any
12
+
13
+ from pydantic import BaseModel, Field
14
+
15
+
16
+ # ---------------------------------------------------------------------------
17
+ # google_map_details
18
+ # ---------------------------------------------------------------------------
19
+
20
+
21
+ class GoogleMapDetailsParams(BaseModel):
22
+ """Parameters for ``google_map_details`` — Google 地图详情采集。"""
23
+
24
+ data_cid: str = Field(default="", description="Google CID (客户标识符)")
25
+ place_id: str | None = Field(default="", description="地点唯一 ID")
26
+ hl: str | None = Field(default="", description="语言代码")
27
+ file_name: str | None = Field(default="{{TasksID}}", description="Builder file_name 字段")
28
+
29
+
30
+ async def google_map_details(self, params: GoogleMapDetailsParams | None = None) -> Any:
31
+ """Call ``google_map_details`` — Google 地图详情采集。"""
32
+ arguments = params.model_dump(exclude_none=True) if params else {}
33
+ return await self.call_tool("google_map_details", arguments)
34
+
35
+
36
+ # ---------------------------------------------------------------------------
37
+ # google_map_comment
38
+ # ---------------------------------------------------------------------------
39
+
40
+
41
+ class GoogleMapCommentParams(BaseModel):
42
+ """Parameters for ``google_map_comment`` — Google 地图评论采集。"""
43
+
44
+ data_cid: str = Field(default="", description="Google CID")
45
+ place_id: str | None = Field(default="", description="地点唯一 ID")
46
+ hl: str | None = Field(default="", description="语言代码")
47
+ file_name: str | None = Field(default="{{TasksID}}", description="Builder file_name 字段")
48
+
49
+
50
+ async def google_map_comment(self, params: GoogleMapCommentParams | None = None) -> Any:
51
+ """Call ``google_map_comment`` — Google 地图评论采集。"""
52
+ arguments = params.model_dump(exclude_none=True) if params else {}
53
+ return await self.call_tool("google_map_comment", arguments)
54
+
55
+
56
+ # ---------------------------------------------------------------------------
57
+ # google_shopping_info
58
+ # ---------------------------------------------------------------------------
59
+
60
+
61
+ class GoogleShoppingInfoParams(BaseModel):
62
+ """Parameters for ``google_shopping_info`` — Google 购物详情采集。"""
63
+
64
+ url: str = Field(..., description="商品 URL")
65
+ file_name: str | None = Field(default="{{TasksID}}", description="Builder file_name 字段")
66
+
67
+
68
+ async def google_shopping_info(self, params: GoogleShoppingInfoParams | None = None) -> Any:
69
+ """Call ``google_shopping_info`` — Google 购物详情采集。"""
70
+ arguments = params.model_dump(exclude_none=True) if params else {}
71
+ return await self.call_tool("google_shopping_info", arguments)
72
+
73
+
74
+ # ---------------------------------------------------------------------------
75
+ # google_play_store_information
76
+ # ---------------------------------------------------------------------------
77
+
78
+
79
+ class GooglePlayStoreInformationParams(BaseModel):
80
+ """Parameters for ``google_play_store_information`` — Google Play 应用信息。"""
81
+
82
+ url: str = Field(..., description="Google Play 应用 URL")
83
+ file_name: str | None = Field(default="{{TasksID}}", description="Builder file_name 字段")
84
+
85
+
86
+ async def google_play_store_information(self, params: GooglePlayStoreInformationParams | None = None) -> Any:
87
+ """Call ``google_play_store_information`` — Google Play 应用信息采集。"""
88
+ arguments = params.model_dump(exclude_none=True) if params else {}
89
+ return await self.call_tool("google_play_store_information", arguments)
90
+
91
+
92
+ # ---------------------------------------------------------------------------
93
+ # google_play_store_reviews
94
+ # ---------------------------------------------------------------------------
95
+
96
+
97
+ class GooglePlayStoreReviewsParams(BaseModel):
98
+ """Parameters for ``google_play_store_reviews`` — Google Play 应用评论。"""
99
+
100
+ url: str = Field(..., description="Google Play 应用 URL")
101
+ file_name: str | None = Field(default="{{TasksID}}", description="Builder file_name 字段")
102
+
103
+
104
+ async def google_play_store_reviews(self, params: GooglePlayStoreReviewsParams | None = None) -> Any:
105
+ """Call ``google_play_store_reviews`` — Google Play 应用评论采集。"""
106
+ arguments = params.model_dump(exclude_none=True) if params else {}
107
+ return await self.call_tool("google_play_store_reviews", arguments)
108
+
109
+
110
+ # ---------------------------------------------------------------------------
111
+ # Attach methods to DataifyClient
112
+ # ---------------------------------------------------------------------------
113
+
114
+
115
+ def _attach(client_cls: type) -> None:
116
+ """Attach all Google scraper methods to the client class."""
117
+ client_cls.google_map_details = google_map_details
118
+ client_cls.google_map_comment = google_map_comment
119
+ client_cls.google_shopping_info = google_shopping_info
120
+ client_cls.google_play_store_information = google_play_store_information
121
+ client_cls.google_play_store_reviews = google_play_store_reviews
@@ -0,0 +1,320 @@
1
+ """Google SERP (Search Engine Results Page) tools.
2
+
3
+ Wraps all Google search variant MCP tools with typed parameter models.
4
+
5
+ Auto-generated. Regenerate with: python scripts/codegen.py
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from typing import Any
11
+
12
+ from pydantic import BaseModel, Field
13
+
14
+
15
+ # ---------------------------------------------------------------------------
16
+ # Shared base parameter sets
17
+ # ---------------------------------------------------------------------------
18
+
19
+
20
+ class _GoogleBaseParams(BaseModel):
21
+ """Base parameters shared by most Google SERP tools."""
22
+
23
+ model_config = {"protected_namespaces": ()}
24
+
25
+ json: str | None = Field(default="1", description="输出格式: 1 JSON, 2 JSON+HTML, 3 HTML, 4 Light JSON")
26
+ google_domain: str | None = Field(default="google.com", description="Google 域名")
27
+ gl: str | None = Field(default="", description="国家/地区代码 (两位)")
28
+ hl: str | None = Field(default="", description="语言代码 (两位)")
29
+ start: str | None = Field(default="0", description="结果偏移量,用于分页")
30
+ no_cache: str | None = Field(default="false", description="true 跳过缓存,false 使用缓存")
31
+ device: str | None = Field(default="desktop", description="设备: desktop, tablet, mobile")
32
+ render_js: str | None = Field(default="", description="设为 true 启用浏览器 JS 渲染")
33
+
34
+
35
+ # ---------------------------------------------------------------------------
36
+ # google_search
37
+ # ---------------------------------------------------------------------------
38
+
39
+
40
+ class GoogleSearchParams(_GoogleBaseParams):
41
+ """Parameters for ``google_search``.
42
+
43
+ 通过 Google 搜索公开网页信息,按国家、语言、位置等条件控制结果。
44
+ """
45
+
46
+ q: str = Field(default="pizza", description="搜索查询内容")
47
+ cr: str | None = Field(default="", description="限制搜索国家/地区")
48
+ lr: str | None = Field(default="", description="限制搜索语言")
49
+ location: str | None = Field(default="", description="搜索发起的地理位置")
50
+ uule: str | None = Field(default="", description="Google 编码位置")
51
+ tbs: str | None = Field(default="", description="高级搜索参数")
52
+ safe: str | None = Field(default="", description="成人内容过滤: active 或 off")
53
+ nfpr: str | None = Field(default="", description="排除自动更正结果: 1 排除,0 包含")
54
+ filter: str | None = Field(default="1", description="过滤器: 1 启用,0 禁用")
55
+ ai_overview: str | None = Field(default="", description="获取 AI 概览内容")
56
+
57
+
58
+ async def google_search(self, params: GoogleSearchParams | None = None) -> Any:
59
+ """Call ``google_search`` — Google 网页搜索。
60
+
61
+ 通过 Google 搜索公开网页信息,支持按国家、语言、位置、设备、
62
+ 时间条件等控制搜索结果。
63
+ """
64
+ arguments = params.model_dump(exclude_none=True) if params else {}
65
+ return await self.call_tool("google_search", arguments)
66
+
67
+
68
+ # ---------------------------------------------------------------------------
69
+ # google_ai_mode
70
+ # ---------------------------------------------------------------------------
71
+
72
+
73
+ class GoogleAiModeParams(BaseModel):
74
+ """Parameters for ``google_ai_mode`` — Google AI Mode 搜索。"""
75
+
76
+ model_config = {"protected_namespaces": ()}
77
+
78
+ q: str = Field(default="pizza", description="搜索查询内容")
79
+ json: str | None = Field(default="1", description="输出格式: 1 JSON, 2 JSON+HTML, 3 HTML, 4 Light JSON")
80
+ gl: str | None = Field(default="", description="国家/地区代码")
81
+ hl: str | None = Field(default="", description="语言代码")
82
+ no_cache: str | None = Field(default="false", description="是否跳过缓存")
83
+
84
+
85
+ async def google_ai_mode(self, params: GoogleAiModeParams | None = None) -> Any:
86
+ """Call ``google_ai_mode`` — Google AI Mode 搜索。"""
87
+ arguments = params.model_dump(exclude_none=True) if params else {}
88
+ return await self.call_tool("google_ai_mode", arguments)
89
+
90
+
91
+ # ---------------------------------------------------------------------------
92
+ # google_news
93
+ # ---------------------------------------------------------------------------
94
+
95
+
96
+ class GoogleNewsParams(BaseModel):
97
+ """Parameters for ``google_news`` — Google News 新闻搜索。"""
98
+
99
+ model_config = {"protected_namespaces": ()}
100
+
101
+ q: str = Field(default="pizza", description="搜索查询内容")
102
+ json: str | None = Field(default="1", description="输出格式")
103
+ gl: str | None = Field(default="", description="国家/地区代码")
104
+ hl: str | None = Field(default="", description="语言代码")
105
+ no_cache: str | None = Field(default="false", description="是否跳过缓存")
106
+ topic_token: str | None = Field(default="", description="新闻主题令牌")
107
+ kgmid: str | None = Field(default="", description="知识图谱 ID")
108
+ publication_token: str | None = Field(default="", description="出版物令牌 (如 CNN, BBC)")
109
+ section_token: str | None = Field(default="", description="版块令牌")
110
+ story_token: str | None = Field(default="", description="报道令牌")
111
+ so: str | None = Field(default="0", description="排序: 0 相关性, 1 日期")
112
+
113
+
114
+ async def google_news(self, params: GoogleNewsParams | None = None) -> Any:
115
+ """Call ``google_news`` — Google News 新闻搜索。"""
116
+ arguments = params.model_dump(exclude_none=True) if params else {}
117
+ return await self.call_tool("google_news", arguments)
118
+
119
+
120
+ # ---------------------------------------------------------------------------
121
+ # google_images
122
+ # ---------------------------------------------------------------------------
123
+
124
+
125
+ class GoogleImagesParams(_GoogleBaseParams):
126
+ """Parameters for ``google_images`` — Google 图片搜索。"""
127
+
128
+ q: str = Field(default="pizza", description="搜索查询内容")
129
+ cr: str | None = Field(default="", description="限制搜索国家/地区")
130
+ lr: str | None = Field(default="", description="限制搜索语言")
131
+ location: str | None = Field(default="", description="地理位置")
132
+ uule: str | None = Field(default="", description="Google 编码位置")
133
+ lat: str | None = Field(default="", description="GPS 纬度")
134
+ lon: str | None = Field(default="", description="GPS 经度")
135
+ radius: str | None = Field(default="", description="范围半径(米)")
136
+ tbm: str | None = Field(default="isch", description="搜索类型: isch")
137
+ ludocid: str | None = Field(default="", description="Google CID")
138
+ lsig: str | None = Field(default="", description="知识图谱地图视图标识")
139
+ kgmid: str | None = Field(default="", description="知识图谱 ID")
140
+ si: str | None = Field(default="", description="缓存搜索参数")
141
+ ibp: str | None = Field(default="", description="布局和扩展渲染")
142
+ uds: str | None = Field(default="", description="搜索过滤")
143
+ tbs: str | None = Field(default="", description="高级搜索参数")
144
+ safe: str | None = Field(default="", description="成人内容过滤")
145
+ nfpr: str | None = Field(default="", description="排除自动更正")
146
+ filter: str | None = Field(default="1", description="过滤器")
147
+ ai_overview: str | None = Field(default="", description="AI 概览")
148
+
149
+
150
+ async def google_images(self, params: GoogleImagesParams | None = None) -> Any:
151
+ """Call ``google_images`` — Google 图片搜索。"""
152
+ arguments = params.model_dump(exclude_none=True) if params else {}
153
+ return await self.call_tool("google_images", arguments)
154
+
155
+
156
+ # ---------------------------------------------------------------------------
157
+ # google_maps
158
+ # ---------------------------------------------------------------------------
159
+
160
+
161
+ class GoogleMapsParams(BaseModel):
162
+ """Parameters for ``google_maps`` — Google Maps 地点搜索。"""
163
+
164
+ model_config = {"protected_namespaces": ()}
165
+
166
+ q: str = Field(..., description="搜索查询内容")
167
+ json: str | None = Field(default="1", description="输出格式")
168
+ ll: str | None = Field(default="", description="GPS 坐标: @lat,lon,zoom 格式")
169
+ location: str | None = Field(default="", description="地理位置")
170
+ lat: str | None = Field(default="", description="GPS 纬度")
171
+ lon: str | None = Field(default="", description="GPS 经度")
172
+ z: str | None = Field(default="", description="地图缩放级别 (3-23)")
173
+ m: str | None = Field(default="", description="地图高度(米)")
174
+ nearby: str | None = Field(default="", description="强制返回附近结果: true/false")
175
+ google_domain: str | None = Field(default="google.com", description="Google 域名")
176
+ hl: str | None = Field(default="", description="语言代码")
177
+ gl: str | None = Field(default="", description="国家/地区代码")
178
+ start: str | None = Field(default="0", description="结果偏移量")
179
+ type: str | None = Field(default="", description="搜索类型: search 或 place")
180
+ data: str | None = Field(default="", description="(弃用) 请改用 place_id 或 data_cid")
181
+ place_id: str | None = Field(default="", description="地点唯一 ID")
182
+ data_cid: str | None = Field(default="", description="Google CID")
183
+ no_cache: str | None = Field(default="false", description="是否跳过缓存")
184
+
185
+
186
+ async def google_maps(self, params: GoogleMapsParams | None = None) -> Any:
187
+ """Call ``google_maps`` — Google Maps 地点搜索。
188
+
189
+ 查询 Google Maps 地点、商家、本地位置、地图搜索结果。
190
+ """
191
+ arguments = params.model_dump(exclude_none=True) if params else {}
192
+ return await self.call_tool("google_maps", arguments)
193
+
194
+
195
+ # ---------------------------------------------------------------------------
196
+ # Remaining Google SERP tools
197
+ # Each follows the pattern: q + json + no_cache + engine-specific params
198
+ # ---------------------------------------------------------------------------
199
+
200
+
201
+ class _GoogleSearchBase(BaseModel):
202
+ """Minimal base for Google variants that only need q + json + no_cache."""
203
+
204
+ model_config = {"protected_namespaces": ()}
205
+
206
+ q: str = Field(default="pizza", description="搜索查询内容")
207
+ json: str | None = Field(default="1", description="输出格式")
208
+ gl: str | None = Field(default="", description="国家/地区代码")
209
+ hl: str | None = Field(default="", description="语言代码")
210
+ no_cache: str | None = Field(default="false", description="是否跳过缓存")
211
+
212
+
213
+ class GoogleFlightsParams(_GoogleSearchBase):
214
+ """Parameters for ``google_flights`` — Google Flights 航班搜索。"""
215
+ pass
216
+
217
+
218
+ class GoogleJobsParams(_GoogleSearchBase):
219
+ """Parameters for ``google_jobs`` — Google Jobs 职位搜索。"""
220
+ pass
221
+
222
+
223
+ class GoogleLocalParams(_GoogleSearchBase):
224
+ """Parameters for ``google_local`` — Google Local 本地搜索。"""
225
+ pass
226
+
227
+
228
+ class GoogleVideosParams(_GoogleSearchBase):
229
+ """Parameters for ``google_videos`` — Google Videos 视频搜索。"""
230
+ pass
231
+
232
+
233
+ class GoogleShoppingParams(_GoogleSearchBase):
234
+ """Parameters for ``google_shopping`` — Google Shopping 购物搜索。"""
235
+ pass
236
+
237
+
238
+ class GoogleTrendsParams(_GoogleSearchBase):
239
+ """Parameters for ``google_trends`` — Google Trends 趋势搜索。"""
240
+ pass
241
+
242
+
243
+ class GooglePlayParams(_GoogleSearchBase):
244
+ """Parameters for ``google_play`` — Google Play 应用搜索。"""
245
+ pass
246
+
247
+
248
+ class GoogleScholarParams(_GoogleSearchBase):
249
+ """Parameters for ``google_scholar`` — Google Scholar 学术搜索。"""
250
+ pass
251
+
252
+
253
+ class GoogleFinanceParams(_GoogleSearchBase):
254
+ """Parameters for ``google_finance`` — Google Finance 财经搜索。"""
255
+ pass
256
+
257
+
258
+ class GoogleHotelsParams(_GoogleSearchBase):
259
+ """Parameters for ``google_hotels`` — Google Hotels 酒店搜索。"""
260
+ pass
261
+
262
+
263
+ class GooglePatentsParams(_GoogleSearchBase):
264
+ """Parameters for ``google_patents`` — Google Patents 专利搜索。"""
265
+ pass
266
+
267
+
268
+ class GoogleLensParams(_GoogleSearchBase):
269
+ """Parameters for ``google_lens`` — Google Lens 图像识别。"""
270
+ pass
271
+
272
+
273
+ # ---------------------------------------------------------------------------
274
+ # Method definitions for all Google SERP tools
275
+ # ---------------------------------------------------------------------------
276
+
277
+
278
+ _GOOGLE_SERP_TOOLS = {
279
+ "google_flights": ("Google Flights 航班搜索", GoogleFlightsParams),
280
+ "google_jobs": ("Google Jobs 职位搜索", GoogleJobsParams),
281
+ "google_local": ("Google Local 本地搜索", GoogleLocalParams),
282
+ "google_videos": ("Google Videos 视频搜索", GoogleVideosParams),
283
+ "google_shopping": ("Google Shopping 购物搜索", GoogleShoppingParams),
284
+ "google_trends": ("Google Trends 趋势搜索", GoogleTrendsParams),
285
+ "google_play": ("Google Play 应用搜索", GooglePlayParams),
286
+ "google_scholar": ("Google Scholar 学术搜索", GoogleScholarParams),
287
+ "google_finance": ("Google Finance 财经搜索", GoogleFinanceParams),
288
+ "google_hotels": ("Google Hotels 酒店搜索", GoogleHotelsParams),
289
+ "google_patents": ("Google Patents 专利搜索", GooglePatentsParams),
290
+ "google_lens": ("Google Lens 图像识别", GoogleLensParams),
291
+ }
292
+
293
+
294
+ def _make_serp_method(tool_name: str, desc: str, param_cls: type[BaseModel]):
295
+ """Factory: create an async method for a Google SERP tool."""
296
+
297
+ async def _method(self, params: param_cls | None = None) -> Any:
298
+ arguments = params.model_dump(exclude_none=True) if params else {}
299
+ return await self.call_tool(tool_name, arguments)
300
+
301
+ _method.__name__ = tool_name
302
+ _method.__doc__ = f"""Call ``{tool_name}`` — {desc}."""
303
+ return _method
304
+
305
+
306
+ # ---------------------------------------------------------------------------
307
+ # Attach methods to DataifyClient
308
+ # ---------------------------------------------------------------------------
309
+
310
+
311
+ def _attach(client_cls: type) -> None:
312
+ """Attach all Google SERP methods to the client class."""
313
+ client_cls.google_search = google_search
314
+ client_cls.google_ai_mode = google_ai_mode
315
+ client_cls.google_news = google_news
316
+ client_cls.google_images = google_images
317
+ client_cls.google_maps = google_maps
318
+
319
+ for tool_name, (desc, param_cls) in _GOOGLE_SERP_TOOLS.items():
320
+ setattr(client_cls, tool_name, _make_serp_method(tool_name, desc, param_cls))
@@ -0,0 +1,41 @@
1
+ """Indeed scraper tools.
2
+
3
+ Wraps Indeed MCP tools: companies info and job listings.
4
+
5
+ Auto-generated. Regenerate with: python scripts/codegen.py
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from typing import Any
11
+
12
+ from pydantic import BaseModel, Field
13
+
14
+
15
+ class _IndeedBase(BaseModel):
16
+ file_name: str | None = Field(default="{{TasksID}}", description="Builder file_name")
17
+
18
+
19
+ class ScrapeIndeedCompaniesInfoParams(_IndeedBase):
20
+ """Parameters for ``scrape_indeed_companies_info`` — Indeed 公司信息采集。"""
21
+ url: str = Field(..., description="Indeed 公司页面 URL")
22
+
23
+
24
+ class ScrapeIndeedJobListingsParams(_IndeedBase):
25
+ """Parameters for ``scrape_indeed_job_listings`` — Indeed 职位列表采集。"""
26
+ url: str = Field(..., description="Indeed 职位搜索 URL")
27
+
28
+
29
+ async def scrape_indeed_companies_info(self, params: ScrapeIndeedCompaniesInfoParams | None = None) -> Any:
30
+ arguments = params.model_dump(exclude_none=True) if params else {}
31
+ return await self.call_tool("scrape_indeed_companies_info", arguments)
32
+
33
+
34
+ async def scrape_indeed_job_listings(self, params: ScrapeIndeedJobListingsParams | None = None) -> Any:
35
+ arguments = params.model_dump(exclude_none=True) if params else {}
36
+ return await self.call_tool("scrape_indeed_job_listings", arguments)
37
+
38
+
39
+ def _attach(client_cls: type) -> None:
40
+ client_cls.scrape_indeed_companies_info = scrape_indeed_companies_info
41
+ client_cls.scrape_indeed_job_listings = scrape_indeed_job_listings
@@ -0,0 +1,52 @@
1
+ """Instagram scraper tools.
2
+
3
+ Wraps Instagram MCP tools: profiles, comment, and reel.
4
+
5
+ Auto-generated. Regenerate with: python scripts/codegen.py
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from typing import Any
11
+
12
+ from pydantic import BaseModel, Field
13
+
14
+
15
+ class _IGBase(BaseModel):
16
+ file_name: str | None = Field(default="{{TasksID}}", description="Builder file_name")
17
+
18
+
19
+ class ScrapeInstagramProfilesParams(_IGBase):
20
+ """Parameters for ``scrape_instagram_profiles`` — Instagram 用户信息采集。"""
21
+ url: str = Field(..., description="Instagram 用户主页 URL")
22
+
23
+
24
+ class ScrapeInstagramCommentParams(_IGBase):
25
+ """Parameters for ``scrape_instagram_comment`` — Instagram 评论采集。"""
26
+ url: str = Field(..., description="Instagram 帖子 URL")
27
+
28
+
29
+ class ScrapeInstagramReelParams(_IGBase):
30
+ """Parameters for ``scrape_instagram_reel`` — Instagram Reel 采集。"""
31
+ url: str = Field(..., description="Instagram Reel URL")
32
+
33
+
34
+ async def scrape_instagram_profiles(self, params: ScrapeInstagramProfilesParams | None = None) -> Any:
35
+ arguments = params.model_dump(exclude_none=True) if params else {}
36
+ return await self.call_tool("scrape_instagram_profiles", arguments)
37
+
38
+
39
+ async def scrape_instagram_comment(self, params: ScrapeInstagramCommentParams | None = None) -> Any:
40
+ arguments = params.model_dump(exclude_none=True) if params else {}
41
+ return await self.call_tool("scrape_instagram_comment", arguments)
42
+
43
+
44
+ async def scrape_instagram_reel(self, params: ScrapeInstagramReelParams | None = None) -> Any:
45
+ arguments = params.model_dump(exclude_none=True) if params else {}
46
+ return await self.call_tool("scrape_instagram_reel", arguments)
47
+
48
+
49
+ def _attach(client_cls: type) -> None:
50
+ client_cls.scrape_instagram_profiles = scrape_instagram_profiles
51
+ client_cls.scrape_instagram_comment = scrape_instagram_comment
52
+ client_cls.scrape_instagram_reel = scrape_instagram_reel