I made a recipe parser to get rid of all the cruft on recipes. Check it out: https://recipeplz.fly.dev/<p>Has this been done? Yes. Does this project use AI? Also yes...but barely.<p>What it <i>does</i> do is grab various forms of metadata that recipe sites often provide for SEO reasons (as per schema.org Recipe spec). It's commonly ld+json, but can be other formats as well.<p>The trick is this: What the numerous recipe sites output is not always the same - there are many variations of the schema.org specs used for Recipes, so this project attempts to correct for that. It's just a bunch of conditionals.<p>If all else fails, it uses AI <i>as a fallback</i> to parse a recipe and return valid ld+json Recipe data based on Schema.org's Recipe spec. I even say "please" to the AI overlords.<p>If a request for a recipe seems to take a long time, you'll know it's pinging OpenAI's API (the Chat API via the 3.5-turbo model).<p>I'd love to see if you can find a recipe that breaks it!
Works pretty good. I've found non English websites braking it.
eg.: <a href="https://www.mindmegette.hu/sajtos-tejfolos-langos-iii.recept/" rel="nofollow">https://www.mindmegette.hu/sajtos-tejfolos-langos-iii.recept...</a>
or: <a href="https://dobruchut.aktuality.sk/recept/28082/fotorecept-bryndzove-halusky/" rel="nofollow">https://dobruchut.aktuality.sk/recept/28082/fotorecept-brynd...</a>
This is super cool! One thing though, maybe add a print button and some styling to hide the inputs in print view:
```css
@media print {
.container:has(form){
display: none;
}
body {
background: transparent !important;
display: grid;
place-items: center;
}
#the-recipe {
padding: 40px !important;
height: 100%;
}
}
```
This broke it <a href="https://www.justonecookbook.com/pressure-cooker-japanese-curry/" rel="nofollow">https://www.justonecookbook.com/pressure-cooker-japanese-cur...</a>