identity:
  name: scrape
  author: ahasasjeb
  label:
    en_US: Scrape
    zh_Hans: 单页面抓取
description:
  human:
    en_US: Turn any url into clean data.
    zh_Hans: 将任何网址转换为干净的数据。
  llm: This tool is designed to scrape URL and output the content in Markdown format.
parameters:
  - name: url
    type: string
    required: true
    label:
      en_US: URL to scrape
      zh_Hans: 要抓取的URL
    human_description:
      en_US: The URL of the website to scrape and extract data from.
      zh_Hans: 要抓取并提取数据的网站URL。
    llm_description: The URL of the website that needs to be crawled. This is a required parameter.
    form: llm
############## Payload #######################
  - name: formats
    type: string
    label:
      en_US: Formats
      zh_Hans: 结果的格式
    placeholder:
      en_US: Use commas to separate multiple tags
      zh_Hans: 多个标签时使用半角逗号分隔
    human_description:
      en_US: |
        Formats to include in the output. Available options: markdown, html, rawHtml, links, screenshot, extract, screenshot@fullPage
      zh_Hans: |
        输出中应包含的格式。可以填入: markdown, html, rawHtml, links, screenshot, extract, screenshot@fullPage
    form: form
  - name: onlyMainContent
    type: boolean
    default: false
    label:
      en_US: only Main Content
      zh_Hans: 仅抓取主要内容
    human_description:
      en_US: Only return the main content of the page excluding headers, navs, footers, etc.
      zh_Hans: 只返回页面的主要内容，不包括头部、导航栏、尾部等。
    form: form
  - name: includeTags
    type: string
    label:
      en_US: Include Tags
      zh_Hans: 仅抓取这些标签
    placeholder:
      en_US: Use commas to separate multiple tags
      zh_Hans: 多个标签时使用半角逗号分隔
    human_description:
      en_US: |
        Only include tags, classes and ids from the page in the final output. Use comma separated values. Example: script, .ad, #footer
      zh_Hans: |
        仅在最终输出中包含HTML页面的这些标签，可以通过标签名、类或ID来设定，使用逗号分隔值。示例：script, .ad, #footer
    form: form
  - name: excludeTags
    type: string
    label:
      en_US: Exclude Tags
      zh_Hans: 要移除这些标签
    human_description:
      en_US: |
        Tags, classes and ids to remove from the page. Use comma separated values. Example: script, .ad, #footer
      zh_Hans: |
        要在最终输出中移除HTML页面的这些标签，可以通过标签名、类或ID来设定，使用逗号分隔值。示例：script, .ad, #footer
    placeholder:
      en_US: Use commas to separate multiple tags
      zh_Hans: 多个标签时使用半角逗号分隔
    form: form
  - name: headers
    type: string
    label:
      en_US: headers
      zh_Hans: 请求头
    human_description:
      en_US: |
        Headers to send with the request. Can be used to send cookies, user-agent, etc. Example: {"cookies": "testcookies"}
      zh_Hans: |
        随请求发送的头部。可以用来发送cookies、用户代理等。示例：{"cookies": "testcookies"}
    placeholder:
      en_US: Please enter an object that can be serialized in JSON
      zh_Hans: 请输入可以json序列化的对象
    form: form
  - name: waitFor
    type: number
    min: 0
    default: 0
    label:
      en_US: wait For
      zh_Hans: 等待时间
    human_description:
      en_US: Wait x amount of milliseconds for the page to load to fetch content.
      zh_Hans: 等待x毫秒以使页面加载并获取内容。
    form: form
  - name: timeout
    type: number
    min: 0
    default: 30000
    label:
      en_US: Timeout
    human_description:
      en_US: Timeout in milliseconds for the request.
      zh_Hans: 请求的超时时间（以毫秒为单位）。
    form: form
############## Extractor Options #######################
  - name: schema
    type: string
    label:
      en_US: Extractor Schema
      zh_Hans: 提取时的结构
    placeholder:
      en_US: Please enter an object that can be serialized in JSON
      zh_Hans: 请输入可以json序列化的对象
    human_description:
      en_US: |
        The schema for the data to be extracted. Example: {
            "type": "object",
            "properties": {"company_mission": {"type": "string"}},
            "required": ["company_mission"]
        }
      zh_Hans: |
       使用该结构去提取，示例：{
            "type": "object",
            "properties": {"company_mission": {"type": "string"}},
            "required": ["company_mission"]
        }
    form: form
  - name: systemPrompt
    type: string
    label:
      en_US: Extractor System Prompt
      zh_Hans: 提取时的系统提示词
    human_description:
      en_US: The system prompt to use for the extraction.
      zh_Hans: 用于提取的系统提示。
    form: form
  - name: prompt
    type: string
    label:
      en_US: Extractor Prompt
      zh_Hans: 提取时的提示词
    human_description:
      en_US: The prompt to use for the extraction without a schema.
      zh_Hans: 用于无schema时提取的提示词
    form: form
