Hacker News new | ask | show | jobs
by 0xfaded 2445 days ago
I've done this as well using scraped recipes from a website that conveniently labeled all ingredients with data tags for their referral program.

Although my goal was to find recipes that shared ingredients to cut back on wastage. I used a constraint solver (https://developers.google.com/optimization) and asked it to produce 5 recipes requiring the minimum number of ingredients, and was rather amused that the first run included such classics as "boiled egg", "butter potato" and "toast".

1 comments

That sounds like a fun project, where did you get the data from?
Don't really want to say because of legality of scraping, but it was a big one with convenient data attributes on the ingredient elements. Shouldn't be too hard to figure out.
C'mon now... talking about data attributes on a html element is not illegal.

allrecipes.com has data attributes on their ingredient list. seriouseats.com has css classes on their ingredients. those are two that i just checked on the spot.