From 3676869086e8aff37585f67457c255d46cae9917 Mon Sep 17 00:00:00 2001 From: Joey Date: Sun, 17 Nov 2024 18:55:17 -0500 Subject: [PATCH] meganvskitchen --- README.rst | 1 + recipe_scrapers/__init__.py | 2 + recipe_scrapers/meganvskitchen.py | 16 + .../meganvskitchen.com/meganvskitchen_1.json | 48 + .../meganvskitchen_1.testhtml | 973 ++++++++++++++++++ .../meganvskitchen.com/meganvskitchen_2.json | 77 ++ .../meganvskitchen_2.testhtml | 957 +++++++++++++++++ 7 files changed, 2074 insertions(+) create mode 100644 recipe_scrapers/meganvskitchen.py create mode 100644 tests/test_data/meganvskitchen.com/meganvskitchen_1.json create mode 100644 tests/test_data/meganvskitchen.com/meganvskitchen_1.testhtml create mode 100644 tests/test_data/meganvskitchen.com/meganvskitchen_2.json create mode 100644 tests/test_data/meganvskitchen.com/meganvskitchen_2.testhtml diff --git a/README.rst b/README.rst index bcb1ad8cd..8e66e4782 100644 --- a/README.rst +++ b/README.rst @@ -295,6 +295,7 @@ Scrapers available for: - `https://www.marthastewart.com/ `_ - `https://matprat.no/ `_ - `https://www.mccormick.com/ `_ +- `https://meganvskitchen.com/ `_ - `https://meljoulwan.com/ `_ - `https://www.melskitchencafe.com/ `_ - `https://www.miljuschka.nl/ `_ diff --git a/recipe_scrapers/__init__.py b/recipe_scrapers/__init__.py index ea538b3e8..d6e08ca57 100644 --- a/recipe_scrapers/__init__.py +++ b/recipe_scrapers/__init__.py @@ -243,6 +243,7 @@ from .marthastewart import MarthaStewart from .matprat import Matprat from .mccormick import McCormick +from .meganvskitchen import MeganVsKitchen from .meljoulwan import Meljoulwan from .melskitchencafe import MelsKitchenCafe from .miljuschka import Miljuschka @@ -543,6 +544,7 @@ LittleSunnyKitchen.host(): LittleSunnyKitchen, LeitesCulinaria.host(): LeitesCulinaria, McCormick.host(): McCormick, + MeganVsKitchen.host(): MeganVsKitchen, Miljuschka.host(): Miljuschka, ModernHoney.host(): ModernHoney, MomOnTimeout.host(): MomOnTimeout, diff --git a/recipe_scrapers/meganvskitchen.py b/recipe_scrapers/meganvskitchen.py new file mode 100644 index 000000000..bffde6c6c --- /dev/null +++ b/recipe_scrapers/meganvskitchen.py @@ -0,0 +1,16 @@ +from ._abstract import AbstractScraper +from ._grouping_utils import group_ingredients + + +class MeganVsKitchen(AbstractScraper): + @classmethod + def host(cls): + return "meganvskitchen.com" + + def ingredient_groups(self): + return group_ingredients( + self.ingredients(), + self.soup, + ".wprm-recipe-ingredient-group h4", + ".wprm-recipe-ingredient", + ) diff --git a/tests/test_data/meganvskitchen.com/meganvskitchen_1.json b/tests/test_data/meganvskitchen.com/meganvskitchen_1.json new file mode 100644 index 000000000..529f9a43b --- /dev/null +++ b/tests/test_data/meganvskitchen.com/meganvskitchen_1.json @@ -0,0 +1,48 @@ +{ + "author": "Megan", + "canonical_url": "https://meganvskitchen.com/crispy-ground-beef-tacos/", + "site_name": "Megan vs Kitchen", + "host": "meganvskitchen.com", + "language": "en-US", + "title": "Crispy Beef Tacos", + "ingredients": [ + "1 pound ground beef (lean, 90%)", + "1 packet of taco seasoning", + "¾ cup enchilada sauce", + "2.5 cups Oaxaca cheese (or Mexican cheese or Monterey Jack )", + "10 corn tortillas", + "1 tbs olive oil", + "Toppings: (hot sauce, guacamole, salsa, pickled onions, sour cream, lime wedge)" + ], + "instructions_list": [ + "Preheat oven to 450F.", + "Brown beef in a skillet over medium-high high heat. Mix in taco seasoning and enchilada sauce. Bring to a simmer, then remove pan from the heat.", + "Wrap corn tortillas in a damp paper towel and microwave for 30-60 seconds or until they are pliable.", + "Brush one side of a tortilla with olive oil. Flip it so the oiled side is on the pan. Add 2 tablespoons of shredded cheese to half of the tortilla, top with 1/4 cup of ground beef, and 2 more tablespoons of shredded cheese. Fold the tortilla over the filling*.", + "Repeat with the remaining tortillas and range the tacos in a single layer on your baking sheet.", + "Bake for 16 minutes, or until the tortillas are crispy and the cheese has melted. Let them cool for 3 minutes before serving." + ], + "category": "Main Course", + "yields": "10 servings", + "description": "These Crispy Ground Beef Tacos are an easy weeknight win. They only take 35 minutes to make, and everyone will love dipping them in salsa, queso, and guacamole!", + "total_time": 35, + "cook_time": 35, + "cuisine": "Mexican", + "ratings": 4.67, + "ratings_count": 9, + "nutrients": { + "servingSize": "2 taco", + "calories": "524 kcal", + "fatContent": "30 g", + "saturatedFatContent": "16 g", + "transFatContent": "0.6 g", + "carbohydrateContent": "28 g", + "sugarContent": "4 g", + "proteinContent": "36 g", + "fiberContent": "4 g" + }, + "image": "https://meganvskitchen.com/wp-content/uploads/2023/07/Crispy-Beef-Tacos-Sheet-Pan.jpg", + "keywords": [ + "Crispy Beef Tacos" + ] +} diff --git a/tests/test_data/meganvskitchen.com/meganvskitchen_1.testhtml b/tests/test_data/meganvskitchen.com/meganvskitchen_1.testhtml new file mode 100644 index 000000000..247d5dc9a --- /dev/null +++ b/tests/test_data/meganvskitchen.com/meganvskitchen_1.testhtml @@ -0,0 +1,973 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + Crispy Ground Beef Tacos (Baked) - Megan vs Kitchen + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/test_data/meganvskitchen.com/meganvskitchen_2.json b/tests/test_data/meganvskitchen.com/meganvskitchen_2.json new file mode 100644 index 000000000..612a467aa --- /dev/null +++ b/tests/test_data/meganvskitchen.com/meganvskitchen_2.json @@ -0,0 +1,77 @@ +{ + "author": "Megan", + "canonical_url": "https://meganvskitchen.com/cheesy-bean-and-rice-burrito/", + "site_name": "Megan vs Kitchen", + "host": "meganvskitchen.com", + "language": "en-US", + "title": "Cheesy Bean and Rice Burrito", + "ingredients": [ + "¼ cup sour cream", + "¼ cup mayonnaise", + "2 tablespoons pickled jalapenos diced (optional)", + "2 tablespoons pickled jalapeno juice (optional)", + "1 teaspoon paprika", + "1 teaspoon cumin", + "½ teaspoon garlic powder", + "½ teaspoon onion powder", + "½ teaspoon chipotle chili powder or regular chili powder", + "8 9-inch flour tortillas", + "1 16-oz can of refried beans", + "2 2/3 cups Spanish rice (I used a box of New East’s Spanish rice which makes about 3 cups)", + "2 cups Mexican cheese blend" + ], + "ingredient_groups": [ + { + "ingredients": [ + "¼ cup sour cream", + "¼ cup mayonnaise", + "2 tablespoons pickled jalapenos diced (optional)", + "2 tablespoons pickled jalapeno juice (optional)", + "1 teaspoon paprika", + "1 teaspoon cumin", + "½ teaspoon garlic powder", + "½ teaspoon onion powder", + "½ teaspoon chipotle chili powder or regular chili powder" + ], + "purpose": "Creamy Jalapeno Sauce" + }, + { + "ingredients": [ + "8 9-inch flour tortillas", + "1 16-oz can of refried beans", + "2 2/3 cups Spanish rice (I used a box of New East’s Spanish rice which makes about 3 cups)", + "2 cups Mexican cheese blend" + ], + "purpose": "Cheesy Bean and Rice Burrito" + } + ], + "instructions_list": [ + "In a small bowl, mix together the creamy jalapeno sauce ingredients.", + "Lay a tortilla flat, spread 1/4 cup of refried beans, 1/3 cup of Spanish rice, 1/4 cup of Mexican cheese, and 1/2 tablespoon* of jalapeno sauce down the middle. Roll into a burrito.", + "Fold the burrito.", + "Place a skillet over medium heat. Add burrito seam side down. Toast on both sides till brown." + ], + "category": "Dinner", + "yields": "8 servings", + "description": "Inspired by Taco Bell, this copycat Cheesy Bean and Rice Burrito is easy to make, cheap, and so much better than the original.", + "total_time": 35, + "cook_time": 15, + "prep_time": 20, + "cuisine": "American", + "ratings": 4.79, + "ratings_count": 37, + "nutrients": { + "servingSize": "1 Burrito", + "calories": "385 kcal", + "fatContent": "15.1 g", + "saturatedFatContent": "6.9 g", + "carbohydrateContent": "51 g", + "sugarContent": "2.1 g", + "proteinContent": "13.4 g", + "fiberContent": "3.2 g" + }, + "image": "https://meganvskitchen.com/wp-content/uploads/2022/11/IMG_5024-scaled.jpg", + "keywords": [ + "cheesy bean and rice burrito" + ] +} diff --git a/tests/test_data/meganvskitchen.com/meganvskitchen_2.testhtml b/tests/test_data/meganvskitchen.com/meganvskitchen_2.testhtml new file mode 100644 index 000000000..73a7aa718 --- /dev/null +++ b/tests/test_data/meganvskitchen.com/meganvskitchen_2.testhtml @@ -0,0 +1,957 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cheesy Bean and Rice Burrito - Megan vs Kitchen + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + \ No newline at end of file