搜索工具调研与安装:neo-ddg-search已安装并集成到学习机制
- 创建search-tool-research.md:记录clawdhub搜索工具调研 - 安装neo-ddg-search:DuckDuckGo Web Search,免费无需API密钥 - 更新learning-notes.md:添加搜索工具学习和clawdhub使用 - 添加工具学习启发:开源优先、多工具备选、持续学习工具 - 更新今日指标:+1搜索工具、+2学习相关文档 - 承诺:使用neo-ddg-search支持自主学习和资料收集
This commit is contained in:
7
skills/neo-ddg-search/.clawhub/origin.json
Normal file
7
skills/neo-ddg-search/.clawhub/origin.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"registry": "https://clawhub.ai",
|
||||
"slug": "neo-ddg-search",
|
||||
"installedVersion": "1.0.0",
|
||||
"installedAt": 1770604497785
|
||||
}
|
||||
48
skills/neo-ddg-search/SKILL.md
Normal file
48
skills/neo-ddg-search/SKILL.md
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
name: ddg-search
|
||||
description: Search the web using DuckDuckGo. Free, no API key required. Use when the user asks to search the web, look something up, find information online, research a topic, or when you need to find current information that isn't in your training data. Also use when web_search tool is unavailable or has no API key configured.
|
||||
---
|
||||
|
||||
# DuckDuckGo Web Search
|
||||
|
||||
Search the web via DuckDuckGo using the `ddgs` Python library. No API key needed.
|
||||
|
||||
## Quick Usage
|
||||
|
||||
```bash
|
||||
python3 skills/ddg-search/scripts/search.py "your search query" [count]
|
||||
```
|
||||
|
||||
- `query` (required): Search terms
|
||||
- `count` (optional): Number of results, default 5, max 20
|
||||
|
||||
## Output Format
|
||||
|
||||
Each result includes:
|
||||
- **Title** — Page title
|
||||
- **URL** — Direct link
|
||||
- **Snippet** — Text excerpt
|
||||
|
||||
## Examples
|
||||
|
||||
```bash
|
||||
# Basic search
|
||||
python3 skills/ddg-search/scripts/search.py "latest AI news"
|
||||
|
||||
# More results
|
||||
python3 skills/ddg-search/scripts/search.py "Python async tutorial" 10
|
||||
```
|
||||
|
||||
## Follow-up
|
||||
|
||||
After searching, use `web_fetch` to read full content from any result URL.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- `ddgs` Python package (install: `pip install --break-system-packages ddgs`)
|
||||
|
||||
## Limitations
|
||||
|
||||
- Unofficial scraping — may break if DuckDuckGo changes their frontend
|
||||
- Rate limits possible under heavy use
|
||||
- English-biased results by default
|
||||
6
skills/neo-ddg-search/_meta.json
Normal file
6
skills/neo-ddg-search/_meta.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"ownerId": "kn7baf9nh73cfcjjh3hevsxq5580q992",
|
||||
"slug": "neo-ddg-search",
|
||||
"version": "1.0.0",
|
||||
"publishedAt": 1770549957374
|
||||
}
|
||||
23
skills/neo-ddg-search/scripts/search.py
Normal file
23
skills/neo-ddg-search/scripts/search.py
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
"""DuckDuckGo web search. Usage: search.py "query" [count]"""
|
||||
import sys
|
||||
from ddgs import DDGS
|
||||
|
||||
query = sys.argv[1] if len(sys.argv) > 1 else ""
|
||||
count = int(sys.argv[2]) if len(sys.argv) > 2 else 5
|
||||
|
||||
if not query:
|
||||
print("Usage: search.py 'query' [count]", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
results = list(DDGS().text(query, max_results=count))
|
||||
if not results:
|
||||
print("No results found.")
|
||||
for i, r in enumerate(results, 1):
|
||||
print(f"\n[{i}] {r.get('title','')}")
|
||||
print(f" {r.get('href','')}")
|
||||
print(f" {r.get('body','')}")
|
||||
except Exception as e:
|
||||
print(f"Error: {e}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
Reference in New Issue
Block a user