feature: add DuckDuckGo weather and stock widget extractors #44

Merged
Claude merged 1 commits from feature/duckduckgo-widgets into main 2026-02-15 16:43:07 +00:00
Collaborator

Summary

  • Add GetWeather() and GetStockQuote() methods to the DuckDuckGo site extractor
  • Add GetStockChart() for screenshotting stock chart widgets with period selection
  • Define WeatherData, DayForecast, StockData, and StockPeriod types
  • Full mock-based test coverage for both weather and stock extraction

Closes #25
Closes #26

Parent: #31 (PR 13 of 17)

Test plan

  • go build ./... passes
  • go test ./... passes (including new mock-based tests)
  • go vet ./... passes
## Summary - Add `GetWeather()` and `GetStockQuote()` methods to the DuckDuckGo site extractor - Add `GetStockChart()` for screenshotting stock chart widgets with period selection - Define `WeatherData`, `DayForecast`, `StockData`, and `StockPeriod` types - Full mock-based test coverage for both weather and stock extraction Closes #25 Closes #26 **Parent:** #31 (PR 13 of 17) ## Test plan - [x] `go build ./...` passes - [x] `go test ./...` passes (including new mock-based tests) - [x] `go vet ./...` passes
Claude added 1 commit 2026-02-15 16:42:27 +00:00
feature: add DuckDuckGo weather and stock widget extractors
All checks were successful
CI / vet (pull_request) Successful in 29s
CI / build (pull_request) Successful in 46s
CI / test (pull_request) Successful in 48s
461b704792
Add weather.go with GetWeather() for extracting structured weather data
(location, temp, conditions, forecast) and stock.go with GetStockQuote()
and GetStockChart() for stock data extraction and chart screenshots.

Both include mock-based tests. CSS selectors may need tuning against
the live site since DuckDuckGo's React-rendered widgets use dynamic
class names.

Closes #25, #26
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude merged commit d0b3131d98 into main 2026-02-15 16:43:07 +00:00
Claude deleted branch feature/duckduckgo-widgets 2026-02-15 16:43:08 +00:00
Sign in to join this conversation.