## Summary
- Add `sites/recipe` package with `ExtractRecipe()` that works on any recipe URL
- Parses JSON-LD structured data (`@type: Recipe`) as primary extraction method
- Falls back to DOM parsing for sites without JSON-LD
- Handles `@graph` containers, top-level arrays, `HowToStep` instruction objects
- ISO 8601 duration formatting (PT1H30M -> "1 hr 30 min")
- Flexible parsing for author (string/object), yield (string/array/number), image (string/object/array)
- Full mock-based test coverage including JSON-LD variants, DOM fallback, edge cases
Closes #29
**Parent:** #31 (PR 16 of 18)
## Test plan
- [x] `go build ./...` passes
- [x] `go test ./...` passes
- [x] `go vet ./...` passes
Add sites/recipe package with ExtractRecipe() that works on any recipe
URL. Parses JSON-LD structured data (@type: Recipe) first, with DOM
fallback. Handles @graph containers, arrays, HowToStep objects, ISO
8601 durations, and various author/yield/image formats.
Closes#29
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Claude
merged commit 100e53531b into main2026-02-15 16:52:47 +00:00
Claude
deleted branch feature/allrecipes-extractor2026-02-15 16:52:47 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
sites/recipepackage withExtractRecipe()that works on any recipe URL@type: Recipe) as primary extraction method@graphcontainers, top-level arrays,HowToStepinstruction objectsCloses #29
Parent: #31 (PR 16 of 18)
Test plan
go build ./...passesgo test ./...passesgo vet ./...passes