-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
2,129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from ._abstract import AbstractScraper | ||
from ._grouping_utils import group_ingredients | ||
from ._utils import get_equipment | ||
|
||
|
||
class PreppyKitchen(AbstractScraper): | ||
@classmethod | ||
def host(cls): | ||
return "preppykitchen.com" | ||
|
||
def ingredient_groups(self): | ||
return group_ingredients( | ||
self.ingredients(), | ||
self.soup, | ||
".wprm-recipe-ingredient-group h4", | ||
".wprm-recipe-ingredient", | ||
) | ||
|
||
def equipment(self): | ||
equipment_container = self.soup.find( | ||
"div", class_="wprm-recipe-equipment-container" | ||
) | ||
if not equipment_container: | ||
return None | ||
equipment_items = [ | ||
item.get_text(strip=True) | ||
for item in equipment_container.find_all( | ||
"div", class_="wprm-recipe-equipment-name" | ||
) | ||
] | ||
return get_equipment(equipment_items) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"author": "John Kanell", | ||
"canonical_url": "https://preppykitchen.com/rocky-road-cookies/", | ||
"site_name": "Preppy Kitchen", | ||
"host": "preppykitchen.com", | ||
"language": "en-US", | ||
"title": "Rocky Road Cookies Recipe", | ||
"ingredients": [ | ||
"1⅔ cups all-purpose flour (200g)", | ||
"½ cup cocoa powder (50g)", | ||
"1 teaspoon baking soda", | ||
"½ teaspoon salt", | ||
"¾ cup unsalted butter (softened (168g)", | ||
"¾ cup light brown sugar (165g)", | ||
"⅓ cup granulated sugar (66g)", | ||
"1 large egg (room temperature)", | ||
"2 teaspoons vanilla extract", | ||
"1 cup mini marshmallows (divided (56g)", | ||
"¾ cup semi-sweet chocolate chips (135g)", | ||
"½ cup almonds (chopped (75g)" | ||
], | ||
"instructions_list": [ | ||
"Preheat the oven to 350°F.", | ||
"In a medium mixing bowl, whisk to combine the flour, cocoa powder, baking soda and salt.", | ||
"In the bowl of a stand mixer fitted with the paddle attachment (or in a large bowl, using a handheld electric mixer), cream the butter, light brown sugar, and granulated sugars on medium speed for about 3 minutes until lightened in color and fluffy.", | ||
"Add the egg and vanilla and mix for 30 seconds, just until combined.", | ||
"Add the flour mixture in three parts, mixing on low speed just until combined between each addition. WIth a spatula, fold in ¾ cup of the marshmallows (40g), the chocolate chips and almonds.", | ||
"Scoop 1½ tablespoon-sized cookies (about 32g each) with a triggered cookie scoop or two spoons, onto parchment lined baking sheets, leaving about 2 inches of space between each cookie. Gently press 2 to 3 of the remaining ¼ cup of marshmallows (16g) into the top of each cookie.", | ||
"Bake for 8 to 10 minutes or until the edges are set and the tops appear dry. Let cool on the pan for 5 minutes, then transfer to a cooling rack to cool completely." | ||
], | ||
"category": "Dessert", | ||
"yields": "28 servings", | ||
"description": "Rocky Road Cookies with gooey marshmallows, melty chocolate chips, and crunchy nuts are about to be your new favorite treat!", | ||
"total_time": 20, | ||
"cook_time": 10, | ||
"prep_time": 10, | ||
"cuisine": "American", | ||
"equipment": [ | ||
"Stand mixer or handheld electric mixer" | ||
], | ||
"nutrients": { | ||
"servingSize": "1 serving", | ||
"calories": "157 kcal", | ||
"fatContent": "9 g", | ||
"saturatedFatContent": "4 g", | ||
"unsaturatedFatContent": "4 g", | ||
"transFatContent": "0.2 g", | ||
"carbohydrateContent": "19 g", | ||
"sugarContent": "11 g", | ||
"proteinContent": "2 g", | ||
"sodiumContent": "88 mg", | ||
"fiberContent": "1 g", | ||
"cholesterolContent": "20 mg" | ||
}, | ||
"image": "https://preppykitchen.com/wp-content/uploads/2024/12/Rocky-Road-Cookies-Recipe-Card.jpg", | ||
"keywords": [ | ||
"how to make rocky road cookies", | ||
"rocky road cookies", | ||
"rocky road cookies recipe" | ||
] | ||
} |
995 changes: 995 additions & 0 deletions
995
tests/test_data/preppykitchen.com/preppykitchen_1.testhtml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"author": "John Kanell", | ||
"canonical_url": "https://preppykitchen.com/mongolian-beef/", | ||
"site_name": "Preppy Kitchen", | ||
"host": "preppykitchen.com", | ||
"language": "en-US", | ||
"title": "Mongolian Beef Recipe", | ||
"ingredients": [ | ||
"⅓ cup soy sauce (80ml)", | ||
"⅓ cup water (80ml)", | ||
"⅓ cup light brown sugar (73g)", | ||
"1 ½ tablespoons minced ginger", | ||
"6 garlic cloves (minced)", | ||
"1 pound flank steak (thinly sliced against the grain (450g)", | ||
"⅓ cup cornstarch (37g)", | ||
"3 tablespoons vegetable oil", | ||
"10 dried red chilies (or ½ teaspoon crushed red pepper flakes), optional)", | ||
"5 green onions (sliced into 1-inch pieces (2¾oucnes/80g)" | ||
], | ||
"ingredient_groups": [ | ||
{ | ||
"ingredients": [ | ||
"⅓ cup soy sauce (80ml)", | ||
"⅓ cup water (80ml)", | ||
"⅓ cup light brown sugar (73g)", | ||
"1 ½ tablespoons minced ginger", | ||
"6 garlic cloves (minced)" | ||
], | ||
"purpose": "For the Sauce" | ||
}, | ||
{ | ||
"ingredients": [ | ||
"1 pound flank steak (thinly sliced against the grain (450g)", | ||
"⅓ cup cornstarch (37g)", | ||
"3 tablespoons vegetable oil", | ||
"10 dried red chilies (or ½ teaspoon crushed red pepper flakes), optional)", | ||
"5 green onions (sliced into 1-inch pieces (2¾oucnes/80g)" | ||
], | ||
"purpose": "For the Beef" | ||
} | ||
], | ||
"instructions_list": [ | ||
"For the Sauce:", | ||
"In a medium bowl, whisk together the soy sauce, water, brown sugar, ginger, and garlic. Set aside.", | ||
"For the Beef:", | ||
"In a large bowl, toss the steak with the cornstarch until well coated.", | ||
"In a large skillet or wok, heat the oil over medium-high heat. Shake the beef strips to remove excess cornstarch, and then add the beef to the skillet. Cook, stirring occasionally, until the beef is browned and mostly cooked through, 3 to 4 minutes. Transfer the beef to a large bowl.", | ||
"With the skillet still over medium-high heat, add the sauce to the skillet and cook, stirring occasionally, scraping any browned bits from the bottom of the skillet with a spoon, until the sauce is thickened, about 3 minutes. Stir in the beef, red chilies (if using), and green onions.", | ||
"Cook, stirring often, until the beef is well coated and the green onions are softened, about 1 minute. Serve immediately over rice." | ||
], | ||
"category": "Main Course", | ||
"yields": "4 servings", | ||
"description": "Quick and savory Mongolian Beef is a restaurant favorite you can make at home in less 20 minutes! Tender and juicy flank steak is the perfect cut of meat to sear before being coated in a homemade sauce. Serve this family-friendly dish with rice and your favorite vegetable.", | ||
"total_time": 20, | ||
"cook_time": 10, | ||
"prep_time": 10, | ||
"cuisine": "Chinese", | ||
"equipment": [ | ||
"Mixing Bowls", | ||
"Large skillet or wok" | ||
], | ||
"nutrients": { | ||
"servingSize": "1 serving", | ||
"calories": "385 kcal", | ||
"fatContent": "16 g", | ||
"saturatedFatContent": "4 g", | ||
"unsaturatedFatContent": "11 g", | ||
"transFatContent": "0.1 g", | ||
"carbohydrateContent": "33 g", | ||
"sugarContent": "19 g", | ||
"proteinContent": "27 g", | ||
"sodiumContent": "1152 mg", | ||
"fiberContent": "1 g", | ||
"cholesterolContent": "68 mg" | ||
}, | ||
"image": "https://preppykitchen.com/wp-content/uploads/2024/12/Mongolian-Beef-Recipe-Card.jpg", | ||
"keywords": [ | ||
"how to make Mongolian Beef", | ||
"Mongolian Beef", | ||
"Mongolian Beef recipe" | ||
] | ||
} |
Oops, something went wrong.