feature: Allrecipes / recipe site extractor #29
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Mort has a
.recipecommand (pkg/logic/recipe/) that extracts recipes from URLs using the generic Readability algorithm. A dedicated recipe site extractor would produce more reliable, structured results for popular recipe sites.Most recipe sites use JSON-LD structured data (
application/ld+jsonwith@type: Recipe) which is far more reliable than parsing the visual HTML.Proposed API
Approach
<script type="application/ld+json">containing@type: RecipeBenefits
Implemented in PR #48. Added
sites/recipepackage withExtractRecipe()that parses JSON-LD structured data (@type: Recipe) with DOM fallback. Handles@graphcontainers,HowToStepobjects, ISO 8601 durations, and flexible author/yield/image formats. Works across all major recipe sites.