Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feastingathome update #1473

Merged
merged 4 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions recipe_scrapers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
from .farmhousedelivery import FarmhouseDelivery
from .farmhouseonboone import FarmhouseOnBoone
from .fattoincasadabenedetta import FattoInCasaDaBenedetta
from .feastingathome import FeastingAtHome
from .felixkitchen import FelixKitchen
from .fifteengram import FifteenGram
from .fifteenspatulas import FifteenSpatulas
Expand Down Expand Up @@ -567,6 +568,7 @@
ElaVegan.host(): ElaVegan,
EvolvingTable.host(): EvolvingTable,
FamilyfoodOnTheTable.host(): FamilyfoodOnTheTable,
FeastingAtHome.host(): FeastingAtHome,
FifteenGram.host(): FifteenGram,
FitSlowCookerQueen.host(): FitSlowCookerQueen,
FortyAprons.host(): FortyAprons,
Expand Down
16 changes: 16 additions & 0 deletions recipe_scrapers/feastingathome.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from ._abstract import AbstractScraper
from ._grouping_utils import group_ingredients


class FeastingAtHome(AbstractScraper):
@classmethod
def host(cls):
return "feastingathome.com"

def ingredient_groups(self):
return group_ingredients(
self.ingredients(),
self.soup,
".tasty-recipes-ingredients-body p strong",
".tasty-recipes-ingredients-body ul li",
)
35 changes: 35 additions & 0 deletions tests/test_data/feastingathome.com/feastingathome.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,38 @@
"1 teaspoon salt",
"oil for searing"
],
"ingredient_groups": [
{
"ingredients": [
"1 lb cherry or grape tomatoes",
"1 tablespoon olive oil",
"1 white or yellow onion, diced",
"2 tablespoons olive oil",
"4-6 cloves garlic, rough chopped",
"1 teaspoon dried thyme (or 1 tablespoon fresh)",
"1 1/2 cups arborio rice or Spanish short-grain rice",
"pinch saffron",
"1/2 teaspoon salt",
"1/2 teaspoon pepper",
"1/4 teaspoon smoked paprika",
"6-8 cups veggie stock or chicken stock, warmed",
"1 tablespoon butter",
"1/4 cup grated parmesan"
],
"purpose": null
},
{
"ingredients": [
"16 ounces large shrimp -raw, peeled, deveined (or sub a white fish)",
"1 tablespoon cumin",
"1 tablespoon smoked paprika",
"2 teaspoons granulated garlic",
"1 teaspoon salt",
"oil for searing"
],
"purpose": "Seared Prawns (optional, see notes)"
}
],
"instructions_list": [
"BLISTER TOMATOES",
"In a large skillet, heat oil over medium-high heat. Add tomatoes (whole) and sear, stirring occasionally, until they burst and soften, about 7 minutes. Turn heat off. Chop if extra-large.",
Expand Down Expand Up @@ -62,6 +94,9 @@
"fiberContent": "2.8 g",
"cholesterolContent": "11.2 mg"
},
"dietary_restrictions": [
"Vegetarian Diet"
],
"image": "https://www.feastingathome.com/wp-content/uploads/2020/07/Tomato-Risotto_-20-225x225.jpg",
"keywords": [
"tomato risotto",
Expand Down
63 changes: 63 additions & 0 deletions tests/test_data/feastingathome.com/feastingathome_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"author": "Sylvia Fountaine | Feasting at Home",
"canonical_url": "https://www.feastingathome.com/dairy-free-ice-cream/",
"site_name": "Feasting At Home",
"host": "feastingathome.com",
"language": "en-US",
"title": "Dairy Free Ice Cream Recipe",
"ingredients": [
"2 ½ cups coconut milk– preferably two boxes(8.5 oz) of Aroy-D boxed, not canned (see notes)",
"½ cup plus 2 tablespoons organic cane sugar",
"¼ teaspoon xantham gum- optional, but gives good texture",
"¾ cup water",
"1/8 teaspoon sea salt",
"2 teaspoons vanilla extract"
],
"instructions_list": [
"Place coconut milk in a medium bowl or 4-cup glass measuring cup.",
"Place sugar and xantham gum in a small saucepan and whisk.",
"Add water, whisk, and heat over medium until sugar is completely dissolved, about 3 minutes. Stir in salt salt and vanilla.",
"Pour the dissolved sugar mixture into the coconut milk and whisk well. Chill for 6 hours if using an ice cream maker with a freezer bowl. The vegan icecream base can be chilled up to 10 days or frozen for later use.",
"Pour into your ice cream according to it’s directions and churn until creamy and frozen!",
"Serve immediately or store in an airtight container in the freezer for up to 3 months. Thaw 10 minutes before using to let it soften slightly."
],
"category": "dessert",
"yields": "4 servings",
"description": "This dairy-free ice cream recipe is so creamy and luscious! It's way better than store-bought and incredibly easy to make using coconut milk. Use it as a jumping-off point for your own creations. Vegan and Gluten-free.",
"total_time": 50,
"cook_time": 40,
"prep_time": 10,
"cuisine": "American",
"cooking_method": "churned",
"ratings": 5.0,
"ratings_count": 1,
"nutrients": {
"servingSize": "1/2 cup",
"calories": "195 calories",
"fatContent": "14.5 g",
"saturatedFatContent": "12.8 g",
"transFatContent": "0 g",
"carbohydrateContent": "17.1 g",
"sugarContent": "15.1 g",
"proteinContent": "1.4 g",
"sodiumContent": "49.9 mg",
"fiberContent": "0.1 g",
"cholesterolContent": "0 mg"
},
"dietary_restrictions": [
"Vegan Diet"
],
"image": "https://www.feastingathome.com/wp-content/uploads/2024/07/Vegan-Ice-Cream-Recipe-1-225x225.jpg",
"keywords": [
"dairy free ice cream",
"dairy free ice cream recipe",
"vegan ice cream",
"vegan ice cream recipe",
"coconut ice cream",
"vegan icecream coconut milk",
"vegan desserts",
"vegan dessert recipe",
"summer desserts",
"best vegan desserrts"
]
}
2,513 changes: 2,513 additions & 0 deletions tests/test_data/feastingathome.com/feastingathome_1.testhtml

Large diffs are not rendered by default.

106 changes: 106 additions & 0 deletions tests/test_data/feastingathome.com/feastingathome_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"author": "Sylvia Fountaine | feasting at home",
"canonical_url": "https://www.feastingathome.com/tomato-risotto/",
"site_name": "Feasting At Home",
"host": "feastingathome.com",
"language": "en-US",
"title": "Tomato Risotto with Saffron",
"ingredients": [
"1 lb cherry or grape tomatoes",
"1 tablespoon olive oil",
"1 white or yellow onion, diced",
"2 tablespoons olive oil",
"4-6 cloves garlic, rough chopped",
"1 teaspoon dried thyme (or 1 tablespoon fresh)",
"1 1/2 cups arborio rice or Spanish short-grain rice",
"pinch saffron",
"1/2 teaspoon salt",
"1/2 teaspoon pepper",
"1/4 teaspoon smoked paprika",
"6-8 cups veggie stock or chicken stock, warmed",
"1 tablespoon butter",
"1/4 cup grated parmesan",
"16 ounces large shrimp -raw, peeled, deveined (or sub a white fish)",
"1 tablespoon cumin",
"1 tablespoon smoked paprika",
"2 teaspoons granulated garlic",
"1 teaspoon salt",
"oil for searing"
],
"ingredient_groups": [
{
"ingredients": [
"1 lb cherry or grape tomatoes",
"1 tablespoon olive oil",
"1 white or yellow onion, diced",
"2 tablespoons olive oil",
"4-6 cloves garlic, rough chopped",
"1 teaspoon dried thyme (or 1 tablespoon fresh)",
"1 1/2 cups arborio rice or Spanish short-grain rice",
"pinch saffron",
"1/2 teaspoon salt",
"1/2 teaspoon pepper",
"1/4 teaspoon smoked paprika",
"6-8 cups veggie stock or chicken stock, warmed",
"1 tablespoon butter",
"1/4 cup grated parmesan"
],
"purpose": null
},
{
"ingredients": [
"16 ounces large shrimp -raw, peeled, deveined (or sub a white fish)",
"1 tablespoon cumin",
"1 tablespoon smoked paprika",
"2 teaspoons granulated garlic",
"1 teaspoon salt",
"oil for searing"
],
"purpose": "Seared Prawns (optional, see notes)"
}
],
"instructions_list": [
"BLISTER TOMATOES",
"In a large skillet, heat oil over medium-high heat. Add tomatoes (whole) and sear, stirring occasionally, until they burst and soften, about 7 minutes. Turn heat off. Chop if extra-large.",
"MAKE RISOTTO",
"At the same time, in a large heavy-bottomed pot or dutch oven, heat the olive oil over medium heat and add the onions. Saute until golden about 10-12 minutes. Add garlic and thyme, saute 2 more minutes until fragrant.",
"Add the rice, saute 1 minute, stirring. Add 2 cups warm stock (enough to cover the rice), saffron and smoked paprika, stir and bring to a simmer. Simmer until most of the liquid is absorbed. Add 1 cup broth and the tomatoes and all their juices. Stir until all the liquid is absorbed. Continue adding broth 1 cup at a time, letting the rice absorb it slowly, stirring often over med-low heat, until the rice is plumped, slightly al dente, yet creamy, about 20-25 minutes. You may not need all 8 cups. ( I used 6 3/4).",
"Stir in the butter and parmesan. Season generously with salt, pepper, and optional chili flakes. Taste, adjust salt. If bland, it probably needs more salt.",
"Serve",
"as a flavorful side or vegetarian main, garnishing with fresh parsley and lemon zest.",
"Optional Seared Prawns:",
"If adding the prawns, mix spices and salt in a bowl. Coat shrimp with the spices. Heat 2-3 tablespoons oil in a skillet (you may need to do this in batches) over medium-high heat, sear each side 2-3 minutes or until cooked through. Top the risotto with the seared prawns."
],
"category": "vegetarian",
"yields": "4 servings",
"description": "Tomato Risotto with juicy vine-ripened tomatoes, and infused with saffron, can be served as a vegetarian main or side dish, or topped off with smoky shrimp.",
"total_time": 60,
"cook_time": 45,
"prep_time": 15,
"cuisine": "Spanish",
"cooking_method": "stovetop",
"ratings": 4.9,
"ratings_count": 37,
"nutrients": {
"servingSize": "1 ½ cup serving without shrimp",
"calories": "435 calories",
"fatContent": "12.1 g",
"saturatedFatContent": "3.8 g",
"transFatContent": "0 g",
"carbohydrateContent": "73.1 g",
"sugarContent": "6.9 g",
"proteinContent": "9 g",
"sodiumContent": "943.1 mg",
"fiberContent": "2.8 g",
"cholesterolContent": "11.2 mg"
},
"dietary_restrictions": [
"Vegetarian Diet"
],
"image": "https://www.feastingathome.com/wp-content/uploads/2020/07/Tomato-Risotto_-20-225x225.jpg",
"keywords": [
"tomato risotto",
"vegetarian risotto",
"shrimp risotto"
]
}
Loading