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

Adds groupings for ACoupleCooks #1471

Merged
merged 5 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
13 changes: 13 additions & 0 deletions recipe_scrapers/acouplecooks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
from ._abstract import AbstractScraper
from ._grouping_utils import group_ingredients


class ACoupleCooks(AbstractScraper):
@classmethod
def host(cls):
return "acouplecooks.com"

def ingredient_groups(self):
return group_ingredients(
self.ingredients(),
self.soup,
".tasty-recipes-ingredients-body p b",
".tasty-recipes-ingredients-body ul li",
)

def ingredients(self):
ingredients_list = self.soup.select(".tasty-recipes-ingredients-body ul li")
return [element.get_text() for element in ingredients_list]
1,033 changes: 0 additions & 1,033 deletions tests/test_data/acouplecooks.com/acouplecooks.testhtml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ingredients": [
"1 pound large shrimp, deveined (peeled or unpeeled)",
"3 garlic cloves",
"1/2 teaspoon kosher salt",
"½ teaspoon kosher salt",
"3 tablespoons butter",
"2 lemon wedges",
"Fresh cilantro or parsley, for garnish"
Expand Down
1,925 changes: 1,925 additions & 0 deletions tests/test_data/acouplecooks.com/acouplecooks_1.testhtml

Large diffs are not rendered by default.

78 changes: 78 additions & 0 deletions tests/test_data/acouplecooks.com/acouplecooks_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"author": "Sonja Overhiser",
"canonical_url": "https://www.acouplecooks.com/brown-butter-pancakes-maple-caramel/",
"site_name": "A Couple Cooks",
"host": "acouplecooks.com",
"language": "en-US",
"title": "Brown Butter Pancakes with Maple Caramel Syrup",
"ingredients": [
"¼ cup unsalted butter",
"¾ cup all purpose flour",
"¼ cup whole wheat flour",
"2 tablespoons brown sugar",
"1 tablespoon baking powder",
"½ teaspoon kosher salt",
"1 cup milk of choice",
"1 large egg",
"1 teaspoon vanilla extract",
"½ teaspoon apple cider vinegar",
"¼ cup pure maple syrup",
"2 tablespoons unsalted butter",
"2 tablespoons heavy whipping cream",
"¼ teaspoon kosher salt"
],
"ingredient_groups": [
{
"ingredients": [
"¼ cup unsalted butter",
"¾ cup all purpose flour",
"¼ cup whole wheat flour",
"2 tablespoons brown sugar",
"1 tablespoon baking powder",
"½ teaspoon kosher salt",
"1 cup milk of choice",
"1 large egg",
"1 teaspoon vanilla extract",
"½ teaspoon apple cider vinegar"
],
"purpose": "Brown Butter Pancakes"
},
{
"ingredients": [
"¼ cup pure maple syrup",
"2 tablespoons unsalted butter",
"2 tablespoons heavy whipping cream",
"¼ teaspoon kosher salt"
],
"purpose": "Salted Maple Butter Drizzle"
}
],
"instructions_list": [
"To make the drizzle, combine the butter and maple syrup in a saucepan. Bring it to a simmer, then simmer on low heat for 4 to 5 minutes, stirring occasionally, until it becomes very foamy and starts to turn a caramel color. Add the cream and boil for 1 minute, stirring occasionally. Remove from the heat and pour into a pitcher to cool (it will thicken more as it cools).",
"Brown the butter: Place the butter (sliced into pieces) in a skillet over medium heat. Heat for a few minutes until it melts, turns foamy, and then starts to become golden brown and then brown in color and smells nutty. For the best flavor, you’ll want the butter to be very brown: but not burnt! Be careful because it can burn very quickly. Immediately remove from the heat and transfer to a medium mixing bowl.",
"In a medium bowl, whisk together the all purpose flour, whole wheat flour, brown sugar, baking powder, and salt.",
"In a separate bowl, whisk the egg, milk, vanilla extract, and vinegar. Once the butter is ready and slightly cooled, whisk it in.",
"Stir the wet ingredients into the dry ingredients until a smooth batter forms. (It will thicken after it sits 1 to 2 minutes.)",
"Lightly butter a skillet or griddle and wipe off extra grease with a paper towel. Heat the skillet to medium low heat. Pour the batter onto the griddle in 1/4 cup scoops. Cook until the bubbles pop on the top and the bottoms are golden. Then flip them and cook until cooked through.",
"Place the cooked pancakes under an inverted bowl to keep them warm. Repeat with the remaining batter, adjusting the heat as necessary to maintain an even temperature, and adding additional splash of milk to the batter if necessary. Serve immediately with maple caramel syrup."
],
"category": "Breakfast",
"yields": "8 servings",
"description": "These brown butter pancakes are irresistibly good, served a salted maple caramel syrup. This simple twist on the classic breakfast favorite takes your pancakes to a whole new level of deliciousness!",
"total_time": 25,
"cook_time": 10,
"prep_time": 15,
"cuisine": "American",
"cooking_method": "Stovetop",
"ratings": 5.0,
"ratings_count": 1,
"dietary_restrictions": [
"Vegetarian Diet"
],
"image": "https://www.acouplecooks.com/wp-content/uploads/2024/08/Brown-Butter-Pancakes-0002-225x225.jpg",
"keywords": [
"Brown butter pancakes",
"maple caramel",
"maple caramel syrup"
]
}
Loading