diff --git a/recipe_scrapers/__init__.py b/recipe_scrapers/__init__.py index 02dc588bd..97dc7b0e9 100644 --- a/recipe_scrapers/__init__.py +++ b/recipe_scrapers/__init__.py @@ -108,6 +108,7 @@ from .cookiesandcups import CookiesAndCups from .cookingcircle import CookingCircle from .cookinglight import CookingLight +from .cookingwithjanica import CookingWithJanica from .cookomix import Cookomix from .cookpad import CookPad from .cookscountry import CooksCountry @@ -531,6 +532,7 @@ CookiesAndCups.host(): CookiesAndCups, CookingCircle.host(): CookingCircle, CookingLight.host(): CookingLight, + CookingWithJanica.host(): CookingWithJanica, Cookomix.host(): Cookomix, CooksCountry.host(): CooksCountry, CooksIllustrated.host(): CooksIllustrated, diff --git a/recipe_scrapers/cookingwithjanica.py b/recipe_scrapers/cookingwithjanica.py new file mode 100644 index 000000000..cfb5e34bb --- /dev/null +++ b/recipe_scrapers/cookingwithjanica.py @@ -0,0 +1,16 @@ +from ._abstract import AbstractScraper +from ._grouping_utils import group_ingredients + + +class CookingWithJanica(AbstractScraper): + @classmethod + def host(cls): + return "cookingwithjanica.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/cookingwithjanica.com/cookingwithjanica_1.json b/tests/test_data/cookingwithjanica.com/cookingwithjanica_1.json new file mode 100644 index 000000000..a33b886c8 --- /dev/null +++ b/tests/test_data/cookingwithjanica.com/cookingwithjanica_1.json @@ -0,0 +1,34 @@ +{ + "author": "Jessica Pinney", + "canonical_url": "https://cookingwithjanica.com/air-fryer-breakfast-potatoes/", + "site_name": "Cooking With Janica", + "host": "cookingwithjanica.com", + "language": "en-US", + "title": "Air Fryer Breakfast Potatoes", + "ingredients": [ + "2 lbs gold or russet potatoes", + "1 teaspoon paprika", + "1 teaspoon garlic powder", + "1 teaspoon onion powder", + "Salt and black pepper to taste", + "2 tablespoons oil (EVOO, avocado, canola, etc.)" + ], + "instructions_list": [ + "Preheat your air fryer to 385°F.", + "Wash your potatoes thoroughly. Using a sharp knife, dice them into 1-inch cubes.", + "Place the potatoes in a large bowl. Sprinkle paprika, garlic powder, onion powder, salt, pepper, and oil on top. Mix gently until well combined.", + "Place the seasoned potatoes in the air fryer basket in a single layer. Air fry for a cooking time of 15-20 minutes or until they turn golden brown. (I recommend shaking the basket halfway through to ensure they cook evenly.)" + ], + "category": "Breakfast", + "yields": "4 servings", + "description": "Crispy breakfast potatoes made in the air fryer.", + "total_time": 25, + "cook_time": 15, + "prep_time": 10, + "cuisine": "American", + "image": "https://cookingwithjanica.com/wp-content/uploads/2023/04/air_fryer_breakfast_potatoes.jpg", + "keywords": [ + "breakfast in air fryer", + "easy breakfast potatoes" + ] +} diff --git a/tests/test_data/cookingwithjanica.com/cookingwithjanica_1.testhtml b/tests/test_data/cookingwithjanica.com/cookingwithjanica_1.testhtml new file mode 100644 index 000000000..e93b0cbba --- /dev/null +++ b/tests/test_data/cookingwithjanica.com/cookingwithjanica_1.testhtml @@ -0,0 +1,2574 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Air Fryer Breakfast Potatoes - Cooking With Janica + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + + + + +
+ + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/test_data/cookingwithjanica.com/cookingwithjanica_2.json b/tests/test_data/cookingwithjanica.com/cookingwithjanica_2.json new file mode 100644 index 000000000..7287cfa82 --- /dev/null +++ b/tests/test_data/cookingwithjanica.com/cookingwithjanica_2.json @@ -0,0 +1,113 @@ +{ + "author": "Jessica Pinney", + "canonical_url": "https://cookingwithjanica.com/christmas-dessert-dip-platter-chocolate-wavy-lays/", + "site_name": "Cooking With Janica", + "host": "cookingwithjanica.com", + "language": "en-US", + "title": "Christmas Dessert Dip Platter", + "ingredients": [ + "1 Stick Unsalted Butter", + "8 oz Cream Cheese", + "1/4 Cup Brown Sugar", + "1/3 Cup White Sugar", + "2 Teaspoons Vanilla Extract", + "1/2 Tsp Salt", + "1 1/2 Cups Chocolate Chips", + "Sprinkles (for garnish)", + "1 8- ounce package cream cheese (softened)", + "¼ cup brown sugar", + "¼ cup powdered sugar (sifted)", + "3 Tablespoons molasses", + "1 teaspoon ground ginger", + "1 teaspoon ground cinnamon", + "dash nutmeg", + "Sprinkles (for garnish)", + "8 oz Marshmallow Fluff", + "8 oz Cream Cheese", + "1 tsp Peppermint Extract", + "1/4 Cup Crushed Candy Canes", + "Milk Chocolate Wavy Lays", + "Dark Chocolate Wavy Lays", + "Milk Chocolate Wavy Lays Covered with Almond Bits" + ], + "ingredient_groups": [ + { + "ingredients": [ + "1 Stick Unsalted Butter", + "8 oz Cream Cheese", + "1/4 Cup Brown Sugar", + "1/3 Cup White Sugar", + "2 Teaspoons Vanilla Extract", + "1/2 Tsp Salt", + "1 1/2 Cups Chocolate Chips", + "Sprinkles (for garnish)" + ], + "purpose": "Christmas Cookie Dough Dip Ingredients" + }, + { + "ingredients": [ + "1 8- ounce package cream cheese (softened)", + "¼ cup brown sugar", + "¼ cup powdered sugar (sifted)", + "3 Tablespoons molasses", + "1 teaspoon ground ginger", + "1 teaspoon ground cinnamon", + "dash nutmeg", + "Sprinkles (for garnish)" + ], + "purpose": "Cream Cheese Gingerbread Dip Ingredients" + }, + { + "ingredients": [ + "8 oz Marshmallow Fluff", + "8 oz Cream Cheese", + "1 tsp Peppermint Extract", + "1/4 Cup Crushed Candy Canes" + ], + "purpose": "Peppermint Fluff Dip Ingredients" + }, + { + "ingredients": [ + "Milk Chocolate Wavy Lays", + "Dark Chocolate Wavy Lays", + "Milk Chocolate Wavy Lays Covered with Almond Bits" + ], + "purpose": "For Dipping" + } + ], + "instructions_list": [ + "Christmas Cookie Dough Dip Recipe", + "Add the butter, cream cheese, and sugars to a medium bowl. Cream for 2-3 minutes with a hand mixer.", + "Add vanilla and salt. Mix another minute.", + "Add chocolate chips and mix until just combined.", + "Transfer to a serving bowl and garnish with sprinkles.", + "Cream Cheese Gingerbread Dip Recipe", + "Beat the cream cheese 1-2 minutes, until smooth.", + "Add the rest of the ingredients and beat until well combined.", + "Transfer to serving bowl and garnish with sprinkles.", + "Peppermint Fluff Dip Recipe", + "Add cream cheese, marshmallow cream, and peppermint extract to a medium bowl. Beat with a hand mixer until well combined.", + "Add crushed candy canes & red food coloring. Mix until incorporated.", + "Transfer to serving bowl and top with additional crushed candy canes.", + "Platter Assembly", + "Place all serving bowls on a platter. Place Chocolate Wavy Lay's in empty space around serving bowls.", + "Serve immediately. Store leftovers in airtight containers in the fridge." + ], + "category": "Dessert", + "yields": "15 servings", + "description": "Three Christmas dessert dips served with chocolate-covered potato chips.", + "total_time": 15, + "prep_time": 15, + "cuisine": "American", + "ratings": 5.0, + "ratings_count": 2, + "nutrients": { + "servingSize": "1 serving", + "calories": "529 kcal" + }, + "image": "https://cookingwithjanica.com/wp-content/uploads/2016/12/christmas_dessert_dip_trio_recipe_lays_chocolate_chips.jpg", + "keywords": [ + "christmas dessert", + "dessert dips" + ] +} diff --git a/tests/test_data/cookingwithjanica.com/cookingwithjanica_2.testhtml b/tests/test_data/cookingwithjanica.com/cookingwithjanica_2.testhtml new file mode 100644 index 000000000..e99799ed9 --- /dev/null +++ b/tests/test_data/cookingwithjanica.com/cookingwithjanica_2.testhtml @@ -0,0 +1,2600 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Christmas Dessert Dip Platter with Chocolate Potato Chips + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + + + + +
+ + + + + +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file