Skip to content

Commit

Permalink
vegrecipesofindia
Browse files Browse the repository at this point in the history
  • Loading branch information
jknndy committed Oct 14, 2024
1 parent dfb6fc6 commit 66c3481
Show file tree
Hide file tree
Showing 5 changed files with 1,790 additions and 621 deletions.
9 changes: 9 additions & 0 deletions recipe_scrapers/vegrecipesofindia.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
from ._abstract import AbstractScraper
from ._grouping_utils import group_ingredients


class VegRecipesOfIndia(AbstractScraper):
@classmethod
def host(cls):
return "vegrecipesofindia.com"

def ingredient_groups(self):
return group_ingredients(
self.ingredients(),
self.soup,
".wprm-recipe-ingredient-group h4",
".wprm-recipe-ingredient",
)
113 changes: 51 additions & 62 deletions tests/test_data/vegrecipesofindia.com/vegrecipesofindia_1.json
Original file line number Diff line number Diff line change
@@ -1,80 +1,69 @@
{
"author": "Dassana Amit",
"canonical_url": "https://www.vegrecipesofindia.com/sarson-ka-saag/",
"canonical_url": "https://www.vegrecipesofindia.com/eggless-pineapple-cream-cake/",
"site_name": "Dassana's Veg Recipes",
"host": "vegrecipesofindia.com",
"language": "en-US",
"title": "Sarson ka Saag Recipe (Authentic Punjabi Style)",
"title": "Eggless Pineapple Cake | Pineapple Pastry Recipe",
"ingredients": [
"1 bunch mustard greens ((sarson))",
"½ bunch bathua leaves ((chenopodium/goosefoot/melde))",
"½ bunch spinach leaves ((palak))",
"1 cup chopped radish leaves (- use tender leaves, (mooli ke patte))",
"3 to 4 inches white radish root",
"1 cup fenugreek leaves (- chopped)",
"1 cup chopped onions (or 2 medium sized onions)",
"1.5 cups chopped tomatoes (or 3 medium-sized tomatoes)",
"2 inches ginger (- chopped)",
"2 green chilies (- chopped)",
"7 to 8 garlic (- medium sized, chopped)",
"½ teaspoon red chili powder",
"2 to 3 pinches asafoetida (or ⅛ teaspoon asafoetida powder (hing))",
"2 to 3 cups water (or add as required)",
"2 tablespoon maize flour (or fine cornmeal)",
"salt (as required)",
"⅓ cup finely chopped onions (or 1 small to medium-sized onion)",
"1 to 2 tablespoons oil (or ghee)",
"2 cups cooked saag (or as required)"
"1 Vanilla Cake (or sponge cake - small to medium-sized, homemade or store-brought)",
"200 ml whipping cream (or heavy cream)",
"¼ teaspoon vanilla extract (or pineapple essence)",
"4 to 5 tablespoons icing sugar (or as required)",
"2 to 3 pineapple slices (tinned or canned, finely chopped)",
"3 to 4 pineapple slices (tinned or canned, for decoration)",
"5 to 6 glazed cherries ( for decoration or chocolate chips, optional)",
"2 to 3 teaspoons Pineapple Juice ( for brushing on the cake, homemade or canned, optional)"
],
"instructions_list": [
"Making sarson ka saag",
"Firstly clean and chop all the greens. Then wash or rinse the greens very well in running water.",
"In a 5 litre stovetop pressure cooker or pan add all the ingredients listed under \"for sarson ka saag\" except for maize flour.",
"Cover the pressure cook and cook for 6 to 7 minutes or more on medium-high heat.",
"If cooking in a pan, then cover and let the greens cook till tender and softened. Do check occasionally.",
"Pour the greens along with the stock and maize flour in a blender. Blend till smooth.",
"In another deep pan or in the same cooker, pour the pureed greens.",
"Simmer for a good 25 to 30 minutes on a low heat stirring at intervals.",
"Tempering for sarson da saag",
"In another small pan, heat oil. Use any neutral oil. You can also make the tempering with ghee if you prefer.",
"Add the chopped onions and saute them till light brown on medium-low heat.",
"Add the prepared saag. Stir and simmer for a couple of minutes.",
"Stir ocaasionally when the saag is simmering.",
"Serving Suggestions",
"Serve sarson ka saag hot with a side of some chopped onions, whole green chilies or mango pickle. Top the saag with a dollop of white butter and serve with Makki di Roti. Also serve a few jaggery cubes by the side.",
"For a vegan saag, omit adding white butter or use vegan butter.",
"Storage",
"Store the pureed and simmered saag in an airtight container for 4 to 5 days in the refrigerarot. You can also freeze it for a month.",
"When ready to serve, remove the quantity you need from the refrigerator and temper it with the required amout of oil and onions."
"Preparation",
"Remove the 2 to 3 pineapple slices from the can draining the syrup in the can itself. Finely chop the pineapple slices and set aside.",
"Slice the cake with a serrated knife from the center carefully into two equal halves.",
"Brush the base slice of the cake with some pineapple juice. This is an optional step. If you do not have pineapple juice, brush with some sugar water. To make sugar water, simply dissolve a 2 to 3 teaspoons of sugar in 2 to 3 tablespoons of water. Mix well and use.",
"Make Cream Frosting",
"In a stand mixer fitted with the wired whip blade, whip the cream and icing sugar along with vanilla extract or pineapple essence, at high speed till you get stiff peaks in the cream.",
"You can also use a hand held electric beater to whip the cream.",
"Taste the whipped cream and add more icing sugar if needed.",
"The cream should have stiff peaks – meaning on turning the bowl the cream should not fall.",
"Mix the finely chopped pineapple with ¼ or ⅓ portion of the whipped cream in a separate bowl.",
"Make Pineapple Cake",
"Spread the pineapple cream frosting on the base slice evenly..",
"Keep the other cake half over on top.",
"Now spread the remaining whipped cream all over the cake on the top as well as the sides, with a palette knife or spatula evenly.",
"Decorate the top of the cake with a few more pineapple slices.",
"Keep the Pineapple Pastry in the refrigerator for 2 to 3 hours so that the cream icing sets.",
"Serve the Eggless Pineapple Cake immediately.",
"Or you can keep it covered in the fridge and then serve later.",
"It is advisable to finish this Pineapple Cake in a day or two."
],
"category": "Main Course",
"yields": "8 servings",
"description": "Peppery, pungent and healthy, Punjabi Sarson ka Saag (or Sarson da Saag) is a favorite meal during the cold North Indian winters, especially when paired with Makki Ki Roti. Making this authentic dish is not difficult, but it does take some time.",
"total_time": 240,
"cook_time": 120,
"prep_time": 120,
"cuisine": "North Indian,Punjabi",
"ratings": 4.93,
"ratings_count": 66,
"category": "Desserts",
"yields": "6 servings",
"description": "Pineapple Pastry is a delightful dessert bursting with sweet, tart, and tangy flavors. Fluffy and tender cake is layered with a creamy whipped frosting, and the bright taste of pineapple is in every bite.",
"total_time": 90,
"cook_time": 40,
"prep_time": 50,
"cuisine": "World",
"ratings": 4.8,
"ratings_count": 10,
"nutrients": {
"servingSize": "1 serving",
"calories": "59 kcal",
"fatContent": "1 g",
"saturatedFatContent": "1 g",
"unsaturatedFatContent": "2 g",
"carbohydrateContent": "10 g",
"sugarContent": "2 g",
"proteinContent": "4 g",
"sodiumContent": "385 mg",
"fiberContent": "2 g"
"calories": "495 kcal",
"fatContent": "15 g",
"saturatedFatContent": "9 g",
"unsaturatedFatContent": "5 g",
"transFatContent": "0.4 g",
"carbohydrateContent": "87 g",
"sugarContent": "51 g",
"proteinContent": "5 g",
"sodiumContent": "607 mg",
"fiberContent": "2 g",
"cholesterolContent": "38 mg"
},
"dietary_restrictions": [
"Vegan Diet",
"Vegetarian Diet"
],
"image": "https://www.vegrecipesofindia.com/wp-content/uploads/2012/12/sarson-ka-saag-recipe-1.jpg",
"image": "https://www.vegrecipesofindia.com/wp-content/uploads/2014/01/eggless-pineapple-cream-cake-recipe-1.jpg",
"keywords": [
"Sarson da Saag",
"Sarson ka Saag"
"Pineapple Cake"
]
}
957 changes: 398 additions & 559 deletions tests/test_data/vegrecipesofindia.com/vegrecipesofindia_1.testhtml

Large diffs are not rendered by default.

150 changes: 150 additions & 0 deletions tests/test_data/vegrecipesofindia.com/vegrecipesofindia_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"author": "Dassana Amit",
"canonical_url": "https://www.vegrecipesofindia.com/eggless-black-forest-cake-recipe/",
"site_name": "Dassana's Veg Recipes",
"host": "vegrecipesofindia.com",
"language": "en-US",
"title": "Eggless Black Forest Cake Recipe (Whole Wheat)",
"ingredients": [
"1 cup whole wheat flour ((leveled) - 120 grams)",
"3 tablespoons cocoa powder",
"½ teaspoon baking soda",
"1 pinch salt",
"¾ cup sugar (- 150 grams, raw sugar or white sugar)",
"1 cup cold water",
"¼ cup oil (- any neutral oil)",
"1 tablespoon lemon juice",
"½ teaspoon vanilla extract (or vanilla essence)",
"1 tablespoon sugar (- raw or white sugar)",
"3 tablespoon water",
"200 ml whipping cream (or heavy cream, cold or chilled)",
"5 tablespoons icing sugar (confectioner's sugar, castor sugar or powdered sugar)",
"¼ cup chopped red cherries (- glazed or canned cherries or fresh sweet cherries)",
"½ cup chocolate shavings (- bittersweet, dark or semi-sweet, add as needed)",
"10 to 11 cherries (- glazed, canned or fresh, add as needed)",
"⅓ to ½ cup chocolate shavings (- bittersweet, dark or semi-sweet, optional)"
],
"ingredient_groups": [
{
"ingredients": [
"1 cup whole wheat flour ((leveled) - 120 grams)",
"3 tablespoons cocoa powder",
"½ teaspoon baking soda",
"1 pinch salt",
"¾ cup sugar (- 150 grams, raw sugar or white sugar)",
"1 cup cold water",
"¼ cup oil (- any neutral oil)",
"1 tablespoon lemon juice",
"½ teaspoon vanilla extract (or vanilla essence)"
],
"purpose": "For chocolate sponge"
},
{
"ingredients": [
"1 tablespoon sugar (- raw or white sugar)",
"3 tablespoon water"
],
"purpose": "For sugar syrup"
},
{
"ingredients": [
"200 ml whipping cream (or heavy cream, cold or chilled)",
"5 tablespoons icing sugar (confectioner's sugar, castor sugar or powdered sugar)"
],
"purpose": "For cream frosting"
},
{
"ingredients": [
"¼ cup chopped red cherries (- glazed or canned cherries or fresh sweet cherries)",
"½ cup chocolate shavings (- bittersweet, dark or semi-sweet, add as needed)"
],
"purpose": "For layers"
},
{
"ingredients": [
"10 to 11 cherries (- glazed, canned or fresh, add as needed)",
"⅓ to ½ cup chocolate shavings (- bittersweet, dark or semi-sweet, optional)"
],
"purpose": "For top layer and sides"
}
],
"instructions_list": [
"Prep",
"First grease a round baking pan of 7.5 inches diameter with oil. You could also line the pan with a parchment paper. Or use two round cake pans (6 inches diameter) and divide the batter equally between two pans.",
"Preheat your oven to 200 degrees Celsius/392 degrees Fahrenheit.",
"Sift whole wheat flour, cocoa powder, salt, baking soda on a plate. Use good quality cocoa powder.",
"In another pan or bowl, take sugar.",
"Add cold water. Stir and mix until all the sugar dissolves.",
"Add oil. Stir briskly for 2 to 3 minutes so that everything is mixed well and emulsifies. Use any neutral oil.",
"Add lemon juice and vanilla extract. Stir and mix again.",
"If you do not have lemon juice, use 1 tablespoon apple cider vinegar or white vinegar.",
"Add the sieved dry ingredients to the wet mixture. Using a wired whisk, mix everything well until you get a smooth batter.",
"Ensure that there are no lumps in the cake batter. The batter has a medium thin consistency.",
"Pour the cake batter in the prepared cake pan or pans.",
"Tap the pan/pans on the countertop, so that the extra air bubbles are let out.",
"Baking chocolate sponge",
"Placing the pans in the center rack of your oven, bake the cakes in the preheated oven at 200 degrees Celsius/392 Fahrenheit for 35 to 40 mins. Since temperatures vary from oven to oven, do keep a check.",
"For baking in a convection mode of microwave oven, preheat the oven at 180 degrees Celsius/356 Fahrenheit degrees for 15 minutes. Then bake the cake at 180 degrees Celsius/356 degrees Fahrenheit for the 30 to 35 minutes.",
"For doneness check the sponge cake with a tooth pick. The tooth pick should come out clean.",
"If the tooth pick is sticky, then place the cake back in the oven and continue to bake for some more minutes.",
"Place the pans on a wired tray and let the cakes cool at room temperature.",
"Note that before frosting let the cake cool completely at room temperature or wrap the cake with a cling film and refrigerate for a couple of hours. You can keep the cake in a covered box and refrigerate.",
"Whipping cream",
"In a stand mixer take the the cold whipping cream and icing sugar/confectioner's sugar/powdered sugar.",
"At the highest speed, whip until the cream becomes stiff. This process will vary depending on the power of your mixer.",
"To check, just invert the bowl. If the cream does not fall, the cream has stiff peaks. Be sure not to over-whip your cream.",
"Remember to chill the cream in the refrigerator at least for a day or two before you use it.",
"If you have used the Indian brand of Amul cream it may take 8 to 10 minutes to whip.",
"Assembling",
"If you have baked one cake, then slice the cake neatly from the center with a large knife or serrated knife. You can also use dental floss to slice the cake into two.",
"Place one layer of the cake with the bottom side facing you. If the top of your cake is domed, then slice the top domed portion evenly so it will lay flat.",
"Make a sugar syrup dissolving 1 tablespoon sugar in 3 tablespoon water.",
"Brush the cake lightly and evenly with this sugar syrup. You can also use rum or wine instead of sugar syrup.",
"Frosting the sponge layers",
"With a spatula spread about ¼ or ⅓ of the whipped cream on top of the cake.",
"Then add a layer of finely chopped glazed red cherries. You can use canned red cherries, glazed cherries or fresh sweet cherries.",
"Sprinkle grated chocolate or chocolate shavings all over.",
"Cover with the second cake and brush the top with the sugar syrup.",
"Spread again ⅓ part of the cream on the top evenly. Spread on the sides of the cake too. If you have a rotating cake stand, this will make frosting the cake much easier.",
"TIP: If you don’t have a cake stand, then use a small, flat plate covered with aluminum foil and place the cake on it before icing. The foil covered plate along with the cake is kept on a heavy board. This way you can easily rotate the foil covered plate while spreading icing on the sides.",
"Making Black Forest Cake",
"Add the remaining whipped cream in a piping bag and use any decorative nozzle. Decorate the cake however you like.",
"Place whole cherries on top of the cake. Top with some chocolate shavings or grated chocolate.",
"Now cover the sides of the cake with the chocolate shavings. Take some chocolate shavings in your fingers. Gently pat and press them on the cream layer with your fingers.",
"Turn the cake stand as you go on placing the chocolate shavings on the cream layer all over the sides. Some chocolate shavings will fall on the the cake stand. Collect these and use them for the decoration on the sides.",
"Cover the cake with a large bowl without it touching the sides and place in the fridge for the cream icing to set. Keep to set for 3 to 4 hours or overnight.",
"When the cream icing has set well, slice and serve eggless black forest cake.",
"Serving Suggestions and Storage",
"Serve black forest cake as is or for a rich luxurious treat pair with a chocolate or vanilla ice cream. Enjoy as an after meal dessert or as a sweet snack anytime of the day.",
"The cake stays well for about 2 to 3 days in the refrigerator. Keep the cake in a covered box or container when storing in the fridge."
],
"category": "Desserts",
"yields": "10 servings",
"description": "This easy recipe for Eggless Black Forest Cake is not only delicious, it is also made a little healthier by using whole wheat flour. Don’t worry though, this beautiful chocolate layer cake still boasts a fabulous taste and texture that’ll have your guests coming back for more.",
"total_time": 50,
"cook_time": 30,
"prep_time": 20,
"cuisine": "World",
"ratings": 4.81,
"ratings_count": 68,
"nutrients": {
"servingSize": "1 serving",
"calories": "375 kcal",
"fatContent": "21 g",
"saturatedFatContent": "10 g",
"transFatContent": "1 g",
"carbohydrateContent": "45 g",
"sugarContent": "30 g",
"proteinContent": "4 g",
"sodiumContent": "71 mg",
"fiberContent": "4 g",
"cholesterolContent": "29 mg"
},
"dietary_restrictions": [
"Vegetarian Diet"
],
"image": "https://www.vegrecipesofindia.com/wp-content/uploads/2021/05/black-forest-cake-4.jpg",
"keywords": [
"Black Forest Cake"
]
}
Loading

0 comments on commit 66c3481

Please sign in to comment.