3 个版本
| 0.1.2 | 2023 年 12 月 27 日 |
|---|---|
| 0.1.1 | 2023 年 12 月 27 日 |
| 0.1.0 | 2023 年 12 月 26 日 |
#1765 in 命令行工具
54KB
614 行
🦆 DuckDuckGo
duckduckgo 0.1.2
▓█████▄ █ ██ ▄████▄ ██ ▄█▀▓█████▄ █ ██ ▄████▄ ██ ▄█▀ ▄████ ▒█████
▒██▀ ██▌ ██ ▓██▒▒██▀ ▀█ ██▄█▒ ▒██▀ ██▌ ██ ▓██▒▒██▀ ▀█ ██▄█▒ ██▒ ▀█▒▒██▒ ██▒
░██ █▌▓██ ▒██░▒▓█ ▄ ▓███▄░ ░██ █▌▓██ ▒██░▒▓█ ▄ ▓███▄░ ▒██░▄▄▄░▒██░ ██▒
░▓█▄ ▌▓▓█ ░██░▒▓▓▄ ▄██▒▓██ █▄ ░▓█▄ ▌▓▓█ ░██░▒▓▓▄ ▄██▒▓██ █▄ ░▓█ ██▓▒██ ██░
░▒████▓ ▒▒█████▓ ▒ ▓███▀ ░▒██▒ █▄░▒████▓ ▒▒█████▓ ▒ ▓███▀ ░▒██▒ █▄░▒▓███▀▒░ ████▓▒░
▒▒▓ ▒ ░▒▓▒ ▒ ▒ ░ ░▒ ▒ ░▒ ▒▒ ▓▒ ▒▒▓ ▒ ░▒▓▒ ▒ ▒ ░ ░▒ ▒ ░▒ ▒▒ ▓▒ ░▒ ▒ ░ ▒░▒░▒░
░ ▒ ▒ ░░▒░ ░ ░ ░ ▒ ░ ░▒ ▒░ ░ ▒ ▒ ░░▒░ ░ ░ ░ ▒ ░ ░▒ ▒░ ░ ░ ░ ▒ ▒░
░ ░ ░ ░░░ ░ ░ ░ ░ ░░ ░ ░ ░ ░ ░░░ ░ ░ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ▒
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░
Search and advanced search in DuckDuckGo
========================================
Perform searches and advanced searches on DuckDuckGo from the command line.
🚀 duckduckgo:一个基于 Rust 的强大命令行工具,用于无缝进行 DuckDuckGo 搜索。
📖 目录
🚀 安装
要安装 duckduckgo,使用以下 Cargo 命令
cargo install --locked duckduckgo
✨ 功能
- 使用或不用操作符执行 DuckDuckGo 搜索。
- 可定制的用户代理、代理和 Cookie 支持。
- 美丽的 ANSI 彩色输出。
🚗 使用方法
通过以下示例学习如何使用 duckduckgo 并探索其功能
执行基本搜索
duckduckgo --query "rust lang"
使用搜索操作符
duckduckgo --query "rust lang" --operators "+tutorial"
启用安全搜索
duckduckgo --query "rust lang" --safe
将输出格式设置为详细
duckduckgo --query "rust lang" --format
将结果数量限制为 3
duckduckgo --query "rust lang" --limit 3
设置用户代理
duckduckgo --query "rust lang" --user-agent "chrome"
支持的浏览器/代理
| 浏览器/代理 |
|---|
| firefox |
| chrome |
| edge |
| safari |
| opera |
| ie11 |
| android |
| ios |
| edge_android |
| opera_mini |
| uc_browser |
| blackberry |
| mozilla |
| bingbot |
| yahoo_slurp |
| duckduckgo |
| baiduspider |
| yandexbot |
| ahrefsbot |
| mj12bot |
| semrushbot |
| sogou_spider |
| exabot |
| dotbot |
| slackbot |
| discord |
| zoom |
| applebot |
| outlook |
| linux_firefox |
| linux_firefox_alternative |
| windows_firefox |
| older_windows_firefox |
| linux_chrome |
| macos_safari |
| android_chrome |
| ios_chrome |
| linux_opera |
| macos_edge |
| windows_edge |
| android_samsung_browser |
| ios_samsung_browser |
| linux_brave |
| windows_brave |
| android_brave |
| ios_brave |
| linux_firefox_new |
| linux_chrome_new |
| macos_safari_new |
| windows_ie_new |
| android_chrome_new |
| ios_chrome_new |
| linux_opera_new |
| macos_edge_new |
| android_samsung_browser_new |
| ios_samsung_browser_new |
| linux_brave_new |
| windows_brave_new |
| android_brave_new |
| ios_brave_new |
| linux_firefox_alternative_new |
| windows_firefox_new |
| linux_chrome_alternative_new |
| macos_safari_alternative_new |
| windows_ie_alternative_new |
| android_chrome_alternative_new |
| ios_chrome_alternative_new |
| linux_opera_alternative_new |
| macos_edge_alternative_new |
| windows_edge_alternative_new |
| android_samsung_browser_alternative_new |
| ios_samsung_browser_alternative_new |
| linux_brave_alternative_new |
| windows_brave_alternative_new |
| android_brave_alternative_new |
| ios_brave_alternative_new |
为后续请求设置 Cookie
duckduckgo --query "rust lang" --cookie
设置代理
duckduckgo --query "rust lang" --proxy "socks5://192.168.1.1:9000"
🎨 选项
| 选项 | 默认值 | 描述 |
|---|---|---|
--safe |
false |
启用安全搜索。 |
--proxy |
"" |
为搜索设置代理(例如,“socks5://192.168.1.1:9000”)。 |
--user-agent |
firefox |
为搜索设置自定义用户代理。 |
--cookie |
true |
为搜索设置cookie。 |
--格式 |
false |
设置输出格式(false 表示列表,true 表示详细)。 |
--limit |
10 |
限制结果数量(默认为10)。 |
🤝 贡献
欢迎贡献和建议!如果您想贡献、报告问题或提出改进建议,请与该项目在 GitHub 上互动。您的贡献有助于提高此 CLI 的社区价值。
📄 许可证
本项目采用 MIT 许可证。
依赖项
~7–20MB
~300K SLoC