Skip to content

Conversation

@grapeot
Copy link
Owner

@grapeot grapeot commented Jan 20, 2025

This PR upgrades and improves the DuckDuckGo search implementation to provide better reliability and search quality.

Changes

  • Upgrade duckduckgo-search to v7.2.1
  • Simplify implementation to use default DDGS configuration
  • Remove deprecated backend='api' parameter
  • Standardize result field names (href, body)
  • Update unit tests to match new implementation

Testing

Added comprehensive testing with diverse queries:

  • Different languages (Chinese, Japanese)
  • Technical queries (Python asyncio, Kubernetes)
  • Special characters (C++, $PATH)
  • Short and long queries (AI, OAuth2 microservices)
  • Emojis and Unicode (🐍 Python, São Paulo)

All unit tests are passing, and manual testing shows improved reliability and search result quality.

Notes

  • The default DDGS configuration provides better access to the full API
  • Removed custom User-Agent handling as it's not needed with the default configuration
  • Standardized field names to match the API's current response format

- Upgrade duckduckgo-search to v7.2.1
- Simplify implementation to use default DDGS configuration
- Remove deprecated backend='api' parameter
- Standardize result field names (href, body)
- Update unit tests to match new implementation
- Add comprehensive testing with diverse queries:
  - Different languages (Chinese, Japanese)
  - Technical queries
  - Special characters
  - Short and long queries
  - Emojis and Unicode

All tests passing, improved reliability and search quality.
@grapeot grapeot merged commit 3d47100 into master Jan 20, 2025
1 check passed
@grapeot grapeot deleted the feature/upgrade-duckduckgo-search branch January 20, 2025 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants