Easy Search Skill
A powerful web search skill that doesn't require API keys. It uses direct HTTP requests and the duckduckgo_search library for reliable results.
Features
- - No API key required - Uses public search interfaces
- 9 search engines - Google, Bing, DuckDuckGo, Baidu, Sogou, 360, Brave, Yandex, Startpage
- Auto engine selection - Automatically picks the best available engine
- Snippet extraction - Get result previews, not just titles
- Time filtering - Filter by day/week/month/year
- Interactive mode - Continuous searching with live engine switching
- Network diagnostics - Built-in connectivity checking and proxy hints
- Proxy support - Respects ALLPROXY, HTTPSPROXY environment variables
- Result caching - Faster repeated searches
- Smart failover - Auto-switches to backup engines on failure
Requirements
- - Python 3.6+
- Optional:
pip install duckduckgo-search requests for better results
Commands
Basic Search
CODEBLOCK0
Time Filtering
CODEBLOCK1
Interactive Mode
CODEBLOCK2
Network Diagnostics
CODEBLOCK3
Engine Management
CODEBLOCK4
Search Engines
| Engine | Best For | Notes |
|---|
| INLINECODE1 | General use | Auto-selects best available engine |
| INLINECODE2 |
Privacy, global | Privacy-focused, reliable HTML parsing |
|
duckduckgo | Privacy, global | Preferred, uses library if installed |
|
bing | Global search | Good reliability, decent snippets |
|
google | Best results | May need proxy in some regions |
|
baidu | Chinese content | Strong anti-crawl measures |
|
sogou | Chinese content | Good alternative to Baidu |
|
so360 | Chinese content | Another Chinese option |
|
brave | Privacy-focused | Growing index |
|
yandex | Russian/Global | Works in some regions |
Output Formats
JSON
CODEBLOCK5
Markdown
CODEBLOCK6
Simple
CODEBLOCK7
Examples
CODEBLOCK8
Proxy Configuration
Set environment variables for proxy support:
CODEBLOCK9
Troubleshooting
| Problem | Solution |
|---|
| Empty results | Try a different engine with INLINECODE11 |
| Connection timeout |
Check proxy settings or use
--timeout 60 |
| Rate limiting | Wait between searches or switch engines |
| DuckDuckGo slow | Install library:
pip install duckduckgo-search |
| No snippets | Some engines have limited snippet extraction |
| Google blocked | Use proxy or switch to Bing/DuckDuckGo |
| All engines fail | Run
--diagnose to check network |
Tips for Best Results
- 1. Use
auto engine - Let the tool pick the best available engine - Install dependencies -
pip install duckduckgo-search requests for better reliability - Use time filters - For news and recent topics, use
--time day or INLINECODE18 - Try Chinese engines - Use
sogou or so360 for Chinese content - Interactive mode - Great for multiple related searches
- Cache is your friend - Repeated searches are instant (1 hour cache)
- Run diagnostics - Use
--diagnose to troubleshoot network issues
Version History
- - v1.1.0 - Added Startpage engine with proper parsing, fixed HTML entity decoding in URLs
- v1.0.1 - Added network diagnostics, better proxy hints, improved error messages
- v1.0.0 - Added 4 new engines (Sogou, 360, Brave, Yandex), time filtering, interactive mode, snippet extraction, engine health caching
- v4.0.0 - Integrated duckduckgo_search library, auto engine selection
- v1.0.0 - Initial release with basic search
简易搜索技能
一个无需API密钥的强大网络搜索技能。它使用直接的HTTP请求和duckduckgo_search库来获取可靠结果。
特性
- - 无需API密钥 - 使用公共搜索接口
- 9个搜索引擎 - Google、Bing、DuckDuckGo、百度、搜狗、360、Brave、Yandex、Startpage
- 自动引擎选择 - 自动选择最佳可用引擎
- 摘要提取 - 获取结果预览,而不仅仅是标题
- 时间筛选 - 按天/周/月/年筛选
- 交互模式 - 支持实时切换引擎的连续搜索
- 网络诊断 - 内置连接检查和代理提示
- 代理支持 - 支持ALLPROXY、HTTPSPROXY环境变量
- 结果缓存 - 加速重复搜索
- 智能故障转移 - 失败时自动切换到备用引擎
要求
- - Python 3.6+
- 可选:pip install duckduckgo-search requests 以获得更好结果
命令
基础搜索
bash
简单搜索(位置参数)
python3 {baseDir}/scripts/search.py Python教程
使用标志
python3 {baseDir}/scripts/search.py --query 你的搜索词
指定引擎
python3 {baseDir}/scripts/search.py AI新闻 --engine bing
更多结果
python3 {baseDir}/scripts/search.py React hooks --results 10
JSON输出(默认)
python3 {baseDir}/scripts/search.py Vue.js --format json
Markdown输出
python3 {baseDir}/scripts/search.py 机器学习 --format md
简单输出(快速阅读)
python3 {baseDir}/scripts/search.py Docker --format simple
CSV输出
python3 {baseDir}/scripts/search.py Kubernetes --format csv
时间筛选
bash
过去24小时的新闻
python3 {baseDir}/scripts/search.py AI新闻 --time day
过去一周的结果
python3 {baseDir}/scripts/search.py React 19 --time week
过去一个月的结果
python3 {baseDir}/scripts/search.py Python 3.13 --time month
过去一年的结果
python3 {baseDir}/scripts/search.py 2024最佳笔记本电脑 --time year
交互模式
bash
启动交互模式
python3 {baseDir}/scripts/search.py --interactive
在交互模式中:
[auto]> Python教程 # 使用自动引擎搜索
[auto]> :engine duckduckgo # 切换引擎
[duckduckgo]> React hooks # 使用新引擎搜索
[duckduckgo]> :format simple # 更改输出格式
[duckduckgo]> :check # 检查引擎健康状态
[duckduckgo]> :quit # 退出
网络诊断
bash
运行网络诊断
python3 {baseDir}/scripts/search.py --diagnose
检查哪些引擎可用
python3 {baseDir}/scripts/search.py --check-engines
引擎管理
bash
清除缓存
python3 {baseDir}/scripts/search.py --clear-cache
禁用自动回退(保持在指定引擎上)
python3 {baseDir}/scripts/search.py 查询 --engine google --no-fallback
搜索引擎
| 引擎 | 最佳用途 | 备注 |
|---|
| auto | 通用 | 自动选择最佳可用引擎 |
| startpage |
隐私、全球 | 注重隐私,可靠的HTML解析 |
| duckduckgo | 隐私、全球 | 首选,如果安装了库则使用 |
| bing | 全球搜索 | 可靠性好,摘要质量不错 |
| google | 最佳结果 | 某些地区可能需要代理 |
| baidu | 中文内容 | 反爬措施较强 |
| sogou | 中文内容 | 百度的良好替代 |
| so360 | 中文内容 | 另一个中文选项 |
| brave | 注重隐私 | 索引正在增长 |
| yandex | 俄语/全球 | 在某些地区可用 |
输出格式
JSON
json
{
query: 搜索词,
engine: bing,
method: HTML抓取,
results: [
{
title: 结果标题,
url: https://example.com,
snippet: 简要描述...
}
],
total: 5
}
Markdown
搜索结果:你的搜索词
引擎:BING
方法:HTML抓取
- 1. 结果标题
> 简要描述...
- 2. 另一个标题
> 更多信息...
简单模式
- 1. 结果标题
https://example.com
简要描述...
- 2. 另一个标题
https://another.com
更多信息...
示例
bash
快速搜索文档
python3 {baseDir}/scripts/search.py Python requests库文档
使用搜狗搜索中文内容
python3 {baseDir}/scripts/search.py 人工智能最新进展 --engine sogou
以markdown格式获取最新新闻
python3 {baseDir}/scripts/search.py OpenAI新闻 --time day --format md
使用交互模式进行多次搜索
python3 {baseDir}/scripts/search.py -i
带时间筛选的搜索
python3 {baseDir}/scripts/search.py React 19特性 --time month --results 10
代理配置
设置环境变量以支持代理:
bash
设置代理
export ALL_PROXY=http://127.0.0.1:7890
export HTTPS_PROXY=http://127.0.0.1:7890
然后运行搜索
python3 {baseDir}/scripts/search.py 你的查询
故障排除
| 问题 | 解决方案 |
|---|
| 结果为空 | 使用 --engine 尝试不同的引擎 |
| 连接超时 |
检查代理设置或使用 --timeout 60 |
| 频率限制 | 在搜索之间等待或切换引擎 |
| DuckDuckGo慢 | 安装库:pip install duckduckgo-search |
| 无摘要 | 某些引擎的摘要提取有限 |
| Google被屏蔽 | 使用代理或切换到Bing/DuckDuckGo |
| 所有引擎失败 | 运行 --diagnose 检查网络 |
获得最佳结果的技巧
- 1. 使用 auto 引擎 - 让工具选择最佳可用引擎
- 安装依赖 - pip install duckduckgo-search requests 以提高可靠性
- 使用时间筛选 - 对于新闻和近期话题,使用 --time day 或 --time week
- 尝试中文引擎 - 对于中文内容,使用 sogou 或 so360
- 交互模式 - 适合多个相关搜索
- 缓存是你的朋友 - 重复搜索即时返回(1小时缓存)
- 运行诊断 - 使用 --diagnose 排查网络问题
版本历史
- - v1.1.0 - 添加了Startpage引擎并支持正确解析,修复了URL中的HTML实体解码
- v1.0.1 - 添加了网络诊断、更好的代理提示、改进的错误消息
- v1.0.0 - 新增4个引擎(搜狗、360、Brave、Yandex)、时间筛选、交互模式、摘要提取、引擎健康缓存
- v4.0.0 - 集成了duckduckgo_search库,自动引擎选择
- v1.0.0 - 初始版本,支持基础搜索