Skip to content

Commit

Permalink
Adds support for cookingwithjanica (#1387)
Browse files Browse the repository at this point in the history
* cookingwithjanica

* new test case

* restore __init__
  • Loading branch information
jknndy authored Jan 6, 2025
1 parent f305b88 commit d55ad36
Show file tree
Hide file tree
Showing 6 changed files with 5,339 additions and 0 deletions.
2 changes: 2 additions & 0 deletions recipe_scrapers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
16 changes: 16 additions & 0 deletions recipe_scrapers/cookingwithjanica.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 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",
)
34 changes: 34 additions & 0 deletions tests/test_data/cookingwithjanica.com/cookingwithjanica_1.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
2,574 changes: 2,574 additions & 0 deletions tests/test_data/cookingwithjanica.com/cookingwithjanica_1.testhtml

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions tests/test_data/cookingwithjanica.com/cookingwithjanica_2.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
Loading

0 comments on commit d55ad36

Please sign in to comment.