Live data from Hacker News

Show HN: An API for scraping recipe web pages

choppingboard.recipes

41–50 of 113 posts

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

#41

Earlier quoted context omitted.

Heh, I once tried to make a DSL to cope with recipes from cookingforengineers.com e.g. their lovely recipe cards [1] . I totally failed to make anything decent!. The combining of multiple steps etc. was just painful!. In the linked site above, that recipe is so straight forward, I'd love to see how it copes with [1] below. [1] http://www.cookingforengineers.com/recipe/127/Shepherds-Pie-...

Those cards are genius. They perfectly illustrate what you can do parallel to other things rather than having to re-read and re-interpret the written instructions continuously.

I'm a fan of his recipe card as well, though I convert it to a standard recipe for sharing with friends who don't see the format in the same light.

Also, a friend and I made enough of his Mac and Cheese[1] to serve 150 people at my wedding a couple years ago. Highly recommended.

1: http://www.cookingforengineers.com/recipe/230/Macaroni-and-C...

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

#42

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…

Heh, I once tried to make a DSL to cope with recipes from cookingforengineers.com e.g. their lovely recipe cards [1] . I totally failed to make anything decent!. The combining of multiple steps etc. was just painful!. In the linked site above, that recipe is so straight forward, I'd love to see how it copes with [1] below. [1] http://www.cookingforengineers.com/recipe/127/Shepherds-Pie-...

That is actually a great visualization for recipes and cooking instructions.

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

#43
post #32

Earlier quoted context omitted.

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

I created http://www.recipastely.com/ to simplify recipe conversion between us and iso units a few years back. It's not perfect but it seems to work fine for me.

You want to get good income at home? do you not know how to start earnings on Internet? there are some popular methods to earn huge income at your home, but when people try that, they bump into a scam so I thought i must share a verified and guaranteed way for free to earn a great sum of money at home. Anyone who is interested should read the given article.. ------>>>WWW.­­­j­o­i­n­m­a­t­e­2­.­­C­O­M

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

#44

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…

I made a recipe scraper that doesn't look at the structured (schema) data, but instead "reads" the whole page to detect the recipe. I found that there are too many recipe sites that don't use the schema rules including, of course, recipes from Facebook posts and emails. Users have used it to copy recipes into their recipe boxes from more than 70,000 different websites. There are a lot of different formats out there!

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

#45
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…

http://schema.org/Recipe

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

#49

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…

I once hacked together some very basic code to try and do this, so that I could answer the question "what can I make with the stuff in my refrigerator".

I gave up on the project pretty quickly (now I'm really tempted to pick it up again), but you can definitely get 90% of the way there with 10% of the effort:

    ingredients = [
      '200g of heavily salted butter',
      'six bottles of beer',
      '50ml of clotted cream',
      'plain brown flour',
      '1 oz french cheese',
      '8 large eggs',
      '2kg of salted pork',
      'a pinch of salt',
      'a tablespoon of honey'
    ]
    
    ingredients.map { |i| IngredientParser.parse i }
    
    # => ["butter",
    #     "beer",
    #     "clotted cream",
    #     "flour",
    #     "cheese",
    #     "egg",
    #     "pork",
    #     "salt",
    #     "honey"]

https://github.com/cronin101/DataChef/blob/master/utils/ingr...

    require '../environment.rb'
    require '../scrapers/bbc_good_food_scraper.rb'

    recipe = Recipe.create source_uri: 'http://www.bbcgoodfood.com/recipes/vietnamese-caramel-trout'

    recipe.update_using_scraper BBCGoodFoodScraper

    puts recipe.title

    puts recipe.description

    puts recipe.ingredient_ids.inspect



    recipe.ingredient_ids.each { |i| puts((Ingredient.find i).inspect) }



    =begin

    Vietnamese caramel trout

    A caramel base balances out the hot and salty ingredients of this Asian-inspired one-pan fish dish for two

    [56, 57, 58, 59, 60, 61, 62, 63, 64]

    #
    #
    #
    #
    #
    #
    #
    #
    #
    =end

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

#50

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…

I once hacked together some very basic code to try and do this, so that I could answer the question "what can I make with the stuff in my refrigerator". I gave up on the project pretty quickly (now I'm really tempted to pick it up again), but you can definitely get 90% of the way there with 10% of the effort: ingredients = [ '200g of heavily salted butter', 'six bottles of beer', '50ml of clotted cream', 'plain brown…

I'm working on this and finding that it's a lot of work (and code) to identify the actual ingredient. Consider "all-purpose sifted flour." That's the same ingredient as "plain flour." So (so!) many ways to write the same ingredient. I'm getting there, though :)
Post reply on HN