🔍 零配置通用搜索工具 - 支持多引擎的命令行搜索
Project description
🔍 Universal Search Tool - 零配置通用搜索工具
🚀 安全、零配置、开箱即用的命令行搜索工具 - 支持多个搜索引擎,绕过搜索限制
✨ 特色功能
- ✅ 安全配置: 用户使用自己的私密 API key,保护隐私
- ✅ 多引擎支持: Google、Bing、DuckDuckGo 搜索
- ✅ 高质量结果: 绕过搜索限制,获得专业级结果
- ✅ 简单易用: 一行命令即可搜索任何内容
- ✅ 跨平台: 支持 Windows、macOS、Linux、Android(Termux)
🔧 安装
方法1: 通过 pip 安装 (推荐)
pip install universal-search-tool
方法2: 开发模式安装
git clone https://github.com/your-username/universal-search-tool.git
cd universal-search-tool
pip install -e .
🚀 快速开始
安装完成后,直接使用:
# 基本搜索
universal-search "Python教程"
# 指定搜索引擎
universal-search "AI工具" --engine bing --count 5
universal-search "React框架" --engine duckduckgo --count 3
# 站点限制搜索
universal-search "开源项目 site:github.com"
universal-search "API文档 site:readthedocs.io"
📋 使用示例
# 通用搜索
universal-search "Django REST framework"
# Bing 搜索不同结果
universal-search "机器学习课程" --engine bing
# DuckDuckGo 注重隐私
universal-search "隐私工具" --engine duckduckgo
# 获取更多结果
universal-search "JavaScript库" --count 10
# 查看帮助
universal-search --help
universal-search --examples
🏗️ 命令行选项
universal-search [OPTIONS] [QUERY]
OPTIONS:
-e, --engine {google,bing,duckduckgo} 搜索引擎 (默认: google)
-c, --count INT 结果数量 (默认: 5)
--examples 显示使用示例
--version 显示版本信息
--help 显示帮助信息
🔌 作为 Python 库使用
也可以在 Python 代码中使用:
from universal_search import UniversalSearch
# 创建搜索实例
search = UniversalSearch()
# 执行搜索
results = search.search("Python教程", engine="google", count=5)
# 打印结果
search.print_results("Python教程", engine="bing", count=3)
# 获取原始结果数据
for result in results:
print(f"标题: {result['title']}")
print(f"链接: {result['url']}")
print(f"描述: {result['snippet']}")
🌟 高级用法
自定义 API Key
如果你有自己的 SerpApi API key:
# 使用自定义 API key
search = UniversalSearch(api_key="your_api_key_here")
批量搜索
queries = ["Python教程", "Django框架", "React学习"]
for query in queries:
search.print_results(query, engine="google", count=3)
print("---" * 20)
📊 搜索引擎对比
| 引擎 | 搜索质量 | 隐私保护 | 结果差异化 |
|---|---|---|---|
| ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ | |
| Bing | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| DuckDuckGo | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
🔧 技术栈
- 后端: Python 3.7+
- 搜索引擎: SerpApi API
- 依赖: google-search-results
- 打包: setuptools, wheel
📝 更新日志
v1.0.0 (2024-12-20)
- ✨ 首次发布
- ✅ 支持 Google、Bing、DuckDuckGo 搜索
- ✅ 零配置,内置 API key
- ✅ 命令行和 Python 库双接口
- ✅ 跨平台支持
🤝 贡献
欢迎提交 Issue 和 Pull Request!
# 开发环境设置
git clone https://github.com/your-username/universal-search-tool.git
cd universal-search-tool
pip install -e .
# 运行测试
python -m pytest tests/
📄 许可证
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情
🔗 相关链接
- SerpApi - 搜索 API 服务
- GitHub Repository
- Bug Reports
🎊 使用愉快! 如果这个工具对你有帮助,请给个 ⭐ Star!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file universal_search_tool-1.2.0.tar.gz.
File metadata
- Download URL: universal_search_tool-1.2.0.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9291ab6a742fe07b0c93b88384148e86b248a2c5d06a6b0284b1afb8599c9568
|
|
| MD5 |
4d5bac1710ef15d13c901a557c7e8124
|
|
| BLAKE2b-256 |
ce8331d2cb45740bfc28a68123066ce5e0389b8b8624680e64792c42f5c97876
|
File details
Details for the file universal_search_tool-1.2.0-py3-none-any.whl.
File metadata
- Download URL: universal_search_tool-1.2.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7389df88377476a4a631d203f373118d1608ba8eaf27a2366161f44c783873f
|
|
| MD5 |
5ef6a805b030b0812f41e6584984e860
|
|
| BLAKE2b-256 |
63a6ff5f53dca3a282b7fbe31d8b7001b9ea0c1f758dc3f34127130abcace54e
|