返回顶部
d

duckduckgo-searchDuckDuckGo搜索

Search the web and fetch URL content using DuckDuckGo. Use when the user wants to search for information online without requiring API keys or paid services. Supports text search with results including title URL and snippet. Also supports URL fetching to extract readable content from web pages. Triggers on phrases like "search for" "look up" "find information about" "fetch url" "get page content" or when web_search is unavailable.

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

duckduckgo-search

DuckDuckGo 搜索与抓取

使用 DuckDuckGo 搜索网页并抓取 URL 内容(无需 API 密钥)。

前置条件

需要安装依赖:
bash
pip3 install duckduckgo-search

功能

1. 网页搜索 (ddg_search.py)

bash
python3 scripts/ddg_search.py 你的搜索查询 [--max-results 10]

2. 网页抓取 (ddg_fetch.py)

bash
python3 scripts/ddg_fetch.py https://example.com [--timeout 30]

使用示例

搜索

bash

基础搜索

python3 scripts/ddg_search.py OpenClaw AI agent

获取更多结果

python3 scripts/ddg_search.py Python 最佳实践 --max-results 15

抓取网页

bash

抓取网页

python3 scripts/ddg_fetch.py https://openclaw.ai

自定义超时时间

python3 scripts/ddg_fetch.py https://example.com --timeout 15

纯文本输出

python3 scripts/ddg_fetch.py https://example.com --format text

输出格式

搜索结果 (JSON)

json { query: 搜索查询, count: 10, results: [ { title: 结果标题, url: https://example.com, snippet: 描述片段 } ] }

抓取结果 (JSON)

json { url: https://example.com, title: 页面标题, text: 提取的可读内容..., description: 元描述, status_code: 200, error: null }

与 OpenClaw 集成

示例工作流程
python

搜索


result = exec({
command: python3 /path/to/skills/duckduckgo-search/scripts/ddg_search.py 查询
})

解析: json.loads(result.stdout)

抓取 URL

result = exec({ command: python3 /path/to/skills/duckduckgo-search/scripts/ddg_fetch.py https://example.com })

解析: json.loads(result.stdout)

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ddg-search-fetch-1776101701 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ddg-search-fetch-1776101701 技能

通过命令行安装

skillhub install ddg-search-fetch-1776101701

下载

⬇ 下载 duckduckgo-search v1.0.1(免费)

文件大小: 7.19 KB | 发布时间: 2026-4-17 14:36

v1.0.1 最新 2026-4-17 14:36
Update README with better documentation

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部