Live data from Hacker News

Show HN: An API for scraping recipe web pages

choppingboard.recipes

101–110 of 113 posts

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

#101

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…

This is something I'm working on. I started with a nutrition graph with endpoints for individual foods, units of measure (with mass conversion for volumetric and common units), physical changes (cutting, blending), chemical changes (cooking, fermenting), and nutrient stats. It's designed as the backend to an NLP interface for describing your recent eating. A food selection composes those endpoints I mentioned; and a…

Is your repository public and/or are you willing to share? I am not looking to make this into a business myself but as a guy who is very frustrated that he can't properly organize his diet, I really want to use something like this.

Hell, if it can be improved to be usable enough and to partially replace a personal nutritionist, one might sell access to it one day.

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

#102

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…

This is something I'm working on. I started with a nutrition graph with endpoints for individual foods, units of measure (with mass conversion for volumetric and common units), physical changes (cutting, blending), chemical changes (cooking, fermenting), and nutrient stats. It's designed as the backend to an NLP interface for describing your recent eating. A food selection composes those endpoints I mentioned; and a…

[deleted]

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

#103
post #30

Earlier quoted context omitted.

Well, as surprising as it might sound there seem to be many units in the kitchen which are not so easy to convert. One example: How many milliliters does a table spoon have? Google says 14.7868 (american table spoon). I have read from 6 to 25... I mean the problem is that the people who writes those recipes use different definitions of the same unit. And that is just one example. How should you convert units which ar…

1 US customary table spoon (~14.8ml) is conventionally taken as 15ml, a teaspoon as 5ml, a cup as 240ml. That's roughly what you get when you buy a set of measuring spoons/cups as well; some may be a tad smaller (following the US measurements), and some are aligned with these metric values — the difference is mostly negligible. These are quite standardised unless you are using something like Australian tablespoons¹ (…

I'm Australian, a 'standard' tablespoon is 20ml, but recipes sometimes use 25. Not sure about the rest of the world. It probably doesn't actually matter too much for most recipes; the ones that need that level of accuracy tend to specify weights.

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

#104
post #39

Earlier quoted context omitted.

Two things that would be so nice would be easy scaling, and unit conversion (even better if that's automatic)

For unit conversion to metric, I made a browser plugin: https://github.com/falk-hueffner/metric-cooking It can also convert from volume to mass, e.g. annotate "3/4 cup plus 2 tablespoons packed light-brown sugar" with "[190 g]". It's a bit hacky (basically a giant regexp) but works nicely for me.

[deleted]

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

#105

Earlier quoted context omitted.

This is something I'm working on. I started with a nutrition graph with endpoints for individual foods, units of measure (with mass conversion for volumetric and common units), physical changes (cutting, blending), chemical changes (cooking, fermenting), and nutrient stats. It's designed as the backend to an NLP interface for describing your recent eating. A food selection composes those endpoints I mentioned; and a…

Is your repository public and/or are you willing to share? I am not looking to make this into a business myself but as a guy who is very frustrated that he can't properly organize his diet, I really want to use something like this. Hell, if it can be improved to be usable enough and to partially replace a personal nutritionist, one might sell access to it one day.

The plan is to put out an alpha release this month. In the meantime you might check out https://www.eatthismuch.com/.

I'm not that experienced with databases; so exposing the design might be unwise from a security perspective. I'm warm to the idea of open sourcing in the future though. I've only shared repo access with a few trusted engineers. If you think you might want to contribute, hmu ryan at terra dot farm.

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

#106
post #85

Earlier quoted context omitted.

I 100% agree with you. Perhaps this kind of structure would be better suited to baking recipes? This sort of precision (amounts, timing, even order of ingredients) can be very important when baking.

Even there, I'm not too sure. I've found bread baking to be shockingly tolerant to variation— as long as I do 1tsp dried yeast per cup of water, and about 1.5 cups of water per loaf, it turns out beautifully. And if there's not enough yeast or it's rising slowly, whatever, just give it another hour to do its thing. Anyway, that's across white, part whole wheat, part rye, and includes all kinds of additives like bran,…

I agree with you on bread. You have to go way off the rails to screw up bread. I was thinking more along the lines of sponges or macarons, things that are a lot more sensitive to variation.

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

#108

Earlier quoted context omitted.

I tried to build a little recipe DB along these lines years ago. What I ended up finding is that as I improved in my own food preparation skills, my interest in super-rigid recipes of this form diminished. Basically, there's just a lot of slush and room for experimentation in cooking. Think about making a stir fry— how many people would level off exact masses of different vegetables to combine in perfect proportion?…

I agree that the much of the value of recipes is as a source of new techniques and combinations. However, I strongly prefer precise recipes vs vague recipes. A recipe should be reproducible as much as possible. I can choose to make changes or combine another recipe based on my priorities. However, vagueness in a recipe adds randomness on top of your changes. If precision for a single element does not matter or varies…

Tbh I can't actually imagine the measurements in a cookbook were ever really intended to be precise, at least in the kind I've seen. Like even 4 cloves of garlic is vague; it'd have to be given in weight, but no one actually reading a recipe would prefer 30g of garlic over 1 clove.

Maybe differs in a restaurant or business, but for home cooking thinking of recipes as precise seems absurd to me. Its 600g... a number that was clearly rounded, and I would bet they eyeballed the amount they wanted and then measured it. Theres too much imprecision in a home kitchen to pretend to be precise

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

#109
post #108

Earlier quoted context omitted.

I agree that the much of the value of recipes is as a source of new techniques and combinations. However, I strongly prefer precise recipes vs vague recipes. A recipe should be reproducible as much as possible. I can choose to make changes or combine another recipe based on my priorities. However, vagueness in a recipe adds randomness on top of your changes. If precision for a single element does not matter or varies…

Tbh I can't actually imagine the measurements in a cookbook were ever really intended to be precise, at least in the kind I've seen. Like even 4 cloves of garlic is vague; it'd have to be given in weight, but no one actually reading a recipe would prefer 30g of garlic over 1 clove. Maybe differs in a restaurant or business, but for home cooking thinking of recipes as precise seems absurd to me. Its 600g... a number t…

As someone relatively amateur to cooking, this is entirely news to me. Whenever something doesn't turn out right, I just assume I didn't follow the recipe exact enough somewhere along the way, but have no idea where. Outside of "be more precise when baking", I don't know enough to know when I need to follow recipes exactly and/or how much leeway I have for fudging otherwise.

It's actually incredibly frustrating when trying to follow a cook book _because_ they're often so vague. Even things like "4 cloves of garlic" are nerve-wracking because I have no idea how big the average garlic clove is, whether mine is above or below that, how much that matters, in what ways that will affect the taste, how I should accommodate for more/less garlic later, and so on. Garlic's an easy example, but this frustration applies to almost every ingredient -- especially when they're "to taste" or "until brown" (how brown?) or "until ready" and so on.

Give me 600g, give me "stir for 2 seconds", give me detail! If I wanted to go off-book, I wouldn't be using a recipe!

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

#110

Earlier quoted context omitted.

Is your repository public and/or are you willing to share? I am not looking to make this into a business myself but as a guy who is very frustrated that he can't properly organize his diet, I really want to use something like this. Hell, if it can be improved to be usable enough and to partially replace a personal nutritionist, one might sell access to it one day.

The plan is to put out an alpha release this month. In the meantime you might check out https://www.eatthismuch.com/ . I'm not that experienced with databases; so exposing the design might be unwise from a security perspective. I'm warm to the idea of open sourcing in the future though. I've only shared repo access with a few trusted engineers. If you think you might want to contribute, hmu ryan at terra dot farm.

Unfortunately I am way too busy lately and I feel I would only leech and not contribute, so better keep me out for now.

I have a very keen interest in the area however! What is most interesting for me recently is how exactly is such data represented in computer structures? Since I know that drawing example graphs and giving good examples would swallow huge amounts of time, I asked if the code is open-source so I could reverse-engineer the data model myself and not pester anyone. =)

I fully understand you not wanting to OSS it yet. I'll be extremely interested if you do that one day in the future.

Post reply on HN