mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-02 12:22:39 +02:00
add scrape_web.
This commit is contained in:
parent
4f93c5fad3
commit
00f7f93234
2 changed files with 27 additions and 0 deletions
|
|
@ -76,6 +76,12 @@ TOOL_TYPE_MAPPINGS = {
|
|||
desc="Related to text2image, image2image using stable diffusion model.",
|
||||
usage_prompt="",
|
||||
),
|
||||
"scrape_web": ToolType(
|
||||
name="scrape_web",
|
||||
module="metagpt.tools.scrape_web",
|
||||
desc="Scrape data from web page.",
|
||||
usage_prompt="",
|
||||
),
|
||||
"other": ToolType(
|
||||
name="other",
|
||||
module="",
|
||||
|
|
|
|||
21
metagpt/tools/functions/schemas/scrape_web.yml
Normal file
21
metagpt/tools/functions/schemas/scrape_web.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
scrape_web:
|
||||
type: async funciton
|
||||
description: "Scrape and save the HTML structure and inner text content of a web page using Playwright."
|
||||
parameters:
|
||||
properties:
|
||||
url:
|
||||
type: str
|
||||
description: "web url"
|
||||
\*url:
|
||||
type: Non-Keyword Arguments
|
||||
description: "other web urls, you can assagin sub url link to it."
|
||||
required:
|
||||
- url
|
||||
returns:
|
||||
inner_text:
|
||||
type: str
|
||||
description: The inner text content of the web page.
|
||||
html:
|
||||
type: str
|
||||
description: The html structure of the web page.
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue