Live data from Hacker News

Show HN: An API for scraping recipe web pages

choppingboard.recipes

11–20 of 113 posts

Re: Show HN: An API for scraping recipe web pages

#11
post #8

This really seems to be an exercise in 'structuring recipe data' rather than the ins-and-outs of scraping. Seems like a much-needed task; is there anything approaching a 'standard' for recipe data already? "ingredients": [ "600g pineapple, peeled, chopped" ] This seems like a prime candidate for improvement; something like the following would seem to be more useful: "ingredients": [{ "ingredient": "pineapple", "quant…

What I'm missing the most in this context is for how many people those ingredients actually are. That's necessary if you want to scale the recipe to fewer or more people.

Yes. As someone with limited cooking skills, I don't think it's quite as simple as 'double quantities of everything to serve 4 people instead of 2'; I'm not sure if it's possible to define a simple formula for how different ingredients scale, nor whether that would need to take into account other ingredients, etc. Would be interesting to see quite how 'algorithmic' cooking can get!

Re: Show HN: An API for scraping recipe web pages

#12
post #7

This really seems to be an exercise in 'structuring recipe data' rather than the ins-and-outs of scraping. Seems like a much-needed task; is there anything approaching a 'standard' for recipe data already? "ingredients": [ "600g pineapple, peeled, chopped" ] This seems like a prime candidate for improvement; something like the following would seem to be more useful: "ingredients": [{ "ingredient": "pineapple", "quant…

MyFitnessPal has the same issue where the quantity values mixed between different units, but also between volume(cup) vs weight(grams). So its a pain in the neck to know how heavy a cup of pasta is. I can see the same issue arising with this tool.

For a lot of the basics (flour, sugar, rice, etc.) conversion formulas/tables exist, but I've found that if you use recipes from around the globe, it's much easier to just have measuring utensils for cups/spoons (US cooking volume units) alongside the standard metric volume measures and scales in your kitchen.

Re: Show HN: An API for scraping recipe web pages

#13
post #8

Earlier quoted context omitted.

What I'm missing the most in this context is for how many people those ingredients actually are. That's necessary if you want to scale the recipe to fewer or more people.

Yes. As someone with limited cooking skills, I don't think it's quite as simple as 'double quantities of everything to serve 4 people instead of 2'; I'm not sure if it's possible to define a simple formula for how different ingredients scale, nor whether that would need to take into account other ingredients, etc. Would be interesting to see quite how 'algorithmic' cooking can get!

> I don't think it's quite as simple as 'double quantities of everything to serve 4 people instead of 2'

It usually is though. Cooking times however don't tend to scale predictably (except for microwaves).

Re: Show HN: An API for scraping recipe web pages

#14
Good work! Parsing hRecipe and Schema.org Recipe entities is what we also did before for Spiceship. Unfortunately, the quality of recipes from the Internet is unspeakably low, so we had to switch almost entirely to parsing e-books. Some websites like SeriousEats are better than the others, but generally, it's not serving any purpose except aggregating the recipes Yummly-style and getting some kind of data insights from them.

Re: Show HN: An API for scraping recipe web pages

#15
post #10

Impressively, it also works for languages other than English (albeit having trouble with formatting here and there). Is there a behind-the-scenes somewhere? Is this regex magic alone?

There are two open formats for recipes: hRecipe microformat, and Schema.org Recipe entity. Aggregators like Yummly parse those. Most food blogs are based on Wordpress or Typepad, both of which has recipe "editors" as plugins and produce valid hRecipe definitions.

Re: Show HN: An API for scraping recipe web pages

#16
post #6

This really seems to be an exercise in 'structuring recipe data' rather than the ins-and-outs of scraping. Seems like a much-needed task; is there anything approaching a 'standard' for recipe data already? "ingredients": [ "600g pineapple, peeled, chopped" ] This seems like a prime candidate for improvement; something like the following would seem to be more useful: "ingredients": [{ "ingredient": "pineapple", "quant…

Whenever I read a recipe online I get this nagging feeling that there should be some widely used open standard for describing recipes that can do all sorts of awesome stuff (like a web crawler such as DuckDuckGo being able to answer "I have a pineapple, cream, and the usual pantry basics, what can I cook?"), but this seems to go directly against the business models of the big recipe sites, so it will not likely see m…

I thought once about doing a "flavour graph" where people could go on and add what they thought were good flavours to mix together. The more people added the same flavours, the stronger the edges between nodes would get. I'd probably have to separate it somehow by geographic region, as tastes vary, but in the end you should have a good approximation of "what goes with what".

Re: Show HN: An API for scraping recipe web pages

#17
post #8

Earlier quoted context omitted.

What I'm missing the most in this context is for how many people those ingredients actually are. That's necessary if you want to scale the recipe to fewer or more people.

Yes. As someone with limited cooking skills, I don't think it's quite as simple as 'double quantities of everything to serve 4 people instead of 2'; I'm not sure if it's possible to define a simple formula for how different ingredients scale, nor whether that would need to take into account other ingredients, etc. Would be interesting to see quite how 'algorithmic' cooking can get!

You still have to know that the amounts stated in the recipe are for 4 people to decide »Hm, that may be a bit much to cook for just two«.

Re: Show HN: An API for scraping recipe web pages

#18
post #7

Earlier quoted context omitted.

MyFitnessPal has the same issue where the quantity values mixed between different units, but also between volume(cup) vs weight(grams). So its a pain in the neck to know how heavy a cup of pasta is. I can see the same issue arising with this tool.

For a lot of the basics (flour, sugar, rice, etc.) conversion formulas/tables exist, but I've found that if you use recipes from around the globe, it's much easier to just have measuring utensils for cups/spoons (US cooking volume units) alongside the standard metric volume measures and scales in your kitchen.

At least some of MFPs ("verified") raw ingredient don't seem to use those though. 100g of Avocados, for example, can easily have several thousands of kcal according to them.

Re: Show HN: An API for scraping recipe web pages

#19

This really seems to be an exercise in 'structuring recipe data' rather than the ins-and-outs of scraping. Seems like a much-needed task; is there anything approaching a 'standard' for recipe data already? "ingredients": [ "600g pineapple, peeled, chopped" ] This seems like a prime candidate for improvement; something like the following would seem to be more useful: "ingredients": [{ "ingredient": "pineapple", "quant…

There is a standard of sorts, if you trust Google:

https://developers.google.com/search/docs/data-types/recipes

Re: Show HN: An API for scraping recipe web pages

#20

Earlier quoted context omitted.

Yes. As someone with limited cooking skills, I don't think it's quite as simple as 'double quantities of everything to serve 4 people instead of 2'; I'm not sure if it's possible to define a simple formula for how different ingredients scale, nor whether that would need to take into account other ingredients, etc. Would be interesting to see quite how 'algorithmic' cooking can get!

> I don't think it's quite as simple as 'double quantities of everything to serve 4 people instead of 2' It usually is though. Cooking times however don't tend to scale predictably (except for microwaves).

> "It usually is though. Cooking times however don't tend to scale predictably (except for microwaves)."

Not sure I agree. In my very limited experience, I have found that cooking times for microwaves do not scale predictably. For example warming up 2 packs of something seems to use less than double the amount of time for 1. I have had issues in the past of doubling or tripling the cooking time for double/triple the quantity and having food overcooked.

Post reply on HN