返回顶部
f

fetch-url获取URL

Use this when you need the raw HTTP response for non-HTML content or APIs. Examples: JSON, XML, RSS/Atom, CSV, plain text, files, or downloads. If the target is a human-readable web page (HTML) that should be converted to markdown, use fetch-webpage instead.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
145
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

fetch-url

获取URL

从URL获取原始HTTP响应。支持多个URL和自定义请求头。

用法

bash

单个URL


node {baseDir}/scripts/fetch.mjs https://api.example.com/data

多个URL

node {baseDir}/scripts/fetch.mjs [https://api.example.com/data1, https://api.example.com/data2]

带自定义请求头(按URL设置)

node {baseDir}/scripts/fetch.mjs [https://api.example.com/json, https://api.example.com/text] [{accept:application/json}, {accept:text/plain}]

带超时设置

node {baseDir}/scripts/fetch.mjs https://api.example.com/data --timeout 60000

示例

JSON API

bash

GitHub API - 获取仓库信息

node {baseDir}/scripts/fetch.mjs https://api.github.com/repos/microsoft/vscode {accept:application/json,user-agent:Mozilla/5.0}

XML

bash

SOAP服务或XML端点

node {baseDir}/scripts/fetch.mjs https://api.example.com/soap {accept:application/xml}

站点地图

node {baseDir}/scripts/fetch.mjs https://example.com/sitemap.xml

RSS / Atom 订阅源

bash

RSS 2.0 订阅源

node {baseDir}/scripts/fetch.mjs https://example.com/rss.xml {accept:application/rss+xml}

Atom 订阅源

node {baseDir}/scripts/fetch.mjs https://example.com/atom.xml {accept:application/atom+xml}

CSV / 纯文本

bash

CSV数据

node {baseDir}/scripts/fetch.mjs https://example.com/data.csv {accept:text/csv}

纯文本

node {baseDir}/scripts/fetch.mjs https://example.com/robots.txt {accept:text/plain}

多种格式

bash

并行获取JSON和XML

node {baseDir}/scripts/fetch.mjs [https://api.example.com/data.json, https://api.example.com/data.xml] [{accept:application/json}, {accept:application/xml}]

选项

  • - urlsjson:URL的JSON数组或单个URL字符串
  • headersjson:可选的请求头对象JSON数组(长度需与URL数组一致)
  • --timeout <毫秒>:请求超时时间(毫秒,默认值:30000)

注意:

  • - 返回原始HTTP响应体
  • 对于多个URL,返回结果的JSON数组
  • 需要Node.js 18+(原生fetch支持)

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 fetch-url-1776063850 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 fetch-url-1776063850 技能

通过命令行安装

skillhub install fetch-url-1776063850

下载

⬇ 下载 fetch-url v1.0.0(免费)

文件大小: 3.64 KB | 发布时间: 2026-4-14 10:55

v1.0.0 最新 2026-4-14 10:55
- Initial release of the fetch-url skill.
- Fetches raw HTTP responses from URLs, supporting JSON, XML, RSS/Atom, CSV, plain text, files, and downloads.
- Allows fetching from multiple URLs in parallel and supports custom headers per URL.
- Supports request timeout configuration.
- Designed for non-HTML content; for HTML-to-markdown conversion, use fetch-webpage.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部