diff --git a/recipe_scrapers/__init__.py b/recipe_scrapers/__init__.py index 2f40bc5d4..a97ff46c0 100644 --- a/recipe_scrapers/__init__.py +++ b/recipe_scrapers/__init__.py @@ -46,6 +46,7 @@ from .hostthetoast import Hostthetoast from .hundredandonecookbooks import HundredAndOneCookbooks from .ig import IG +from .innit import Innit from .inspiralized import Inspiralized from .jamieoliver import JamieOliver from .justbento import JustBento @@ -150,6 +151,7 @@ Hostthetoast.host(): Hostthetoast, HundredAndOneCookbooks.host(): HundredAndOneCookbooks, IG.host(): IG, + Innit.host(): Innit, Inspiralized.host(): Inspiralized, JamieOliver.host(): JamieOliver, JustBento.host(): JustBento, diff --git a/recipe_scrapers/innit.py b/recipe_scrapers/innit.py new file mode 100644 index 000000000..952219134 --- /dev/null +++ b/recipe_scrapers/innit.py @@ -0,0 +1,32 @@ +from ._abstract import AbstractScraper + +""" + Note that innit hosts recipes for several companies. I found it while looking at centralmarket.com +""" + + +class Innit(AbstractScraper): + @classmethod + def host(self, domain="com"): + return f"innit.{domain}" + + def title(self): + return self.schema.title() + + def total_time(self): + return self.schema.total_time() + + def yields(self): + return self.schema.yields() + + def image(self): + return self.schema.image() + + def ingredients(self): + return self.schema.ingredients() + + def instructions(self): + return self.schema.instructions() + + def ratings(self): + return self.schema.ratings() diff --git a/tests/test_data/innit.testhtml b/tests/test_data/innit.testhtml new file mode 100644 index 000000000..48783e020 --- /dev/null +++ b/tests/test_data/innit.testhtml @@ -0,0 +1,2016 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tofu Mixed Greens Salad with Broccoli Beet Mix & Carrot Ginger Dressing - Innit + + + + + + +
+
+
+
+ + + + +
+
+
+
+ +
+ + +
+
+ + + + + +
+
+
+ +
+
+

Ingredients

+ 4 Servings +
+ +
+
+ +
+
+
+

Produce

+
+ +
+
    +
  • + + + +

    + Carrots + 2 +

    +
  • +
+
+
+
    +
  • + + + +

    + Fresh Ginger + 1 piece +

    +
  • +
+
+
+
    +
  • + + + +

    + Orange + 1/2 +

    +
  • +
+
+
+
    +
  • + + + +

    + Fresh Chives + 1 Tbsp +

    +
  • +
+
+
+
    +
  • + + + +

    + Broccoli + 2 cups +

    +
  • +
+
+
+
    +
  • + + + +

    + Precooked Beets + 1 lb +

    +
  • +
+
+
+
    +
  • + + + +

    + Italian Parsley + 2 Tbsp +

    +
  • +
+
+
+
    +
  • + + + +

    + Fresh Spring Mix + 4 cups +

    +
  • +
+
+
+
+
+

Spices

+
+ +
+
    +
  • + + + +

    + Kosher Salt + 1 1/3 tsp +

    +
  • +
+
+
+
+
+
+
+

Packaged Products

+
+ +
+
    +
  • + + + +

    + Extra Firm Tofu + 2 packages +

    +
  • +
+
+
+
+
+

Pantry

+
+ +
+
    +
  • + + + +

    + Olive Oil + 2/3 cup +

    +
  • +
+
+
+
    +
  • + + + +

    + Black Pepper + 2 pinches +

    +
  • +
+
+
+
    +
  • + + + +

    + Rice Wine Vinegar + 1/4 cup +

    +
  • +
+
+
+
+
+
+
+

Canned/Bottled Goods

+
+ +
+
    +
  • + + + +

    + Miso Paste + 1 Tbsp +

    +
  • +
+
+
+
    +
  • + + + +

    + Sesame Seed Oil + 1/2 tsp +

    +
  • +
+
+
+
    +
  • + + + +

    + Honey + 1/2 Tbsp +

    +
  • +
+
+
+
+
+

Nuts & Seeds

+
+ +
+
    +
  • + + + +

    + Sunflower Seeds + 1 cup +

    +
  • +
+
+
+
+
+
+
+ +
+
+

Preparation

+
+ +
+
    +
  1. +
    + + + + + +
    + +
    +

    Preheat

    + + +

    Preheat the oven to 425F. Line sheet pan with foil.

    + + Connect Oven +
    +
  2. +
  3. +
    + + + + + +
    + +
    +

    Sear Tofu

    + + +

    Drain, pat dry & prepare tofu. Heat pan on high heat for 2 minutes. Cook for 7 min or until golden brown on all sides, seasoning half way. Remove from pan.

    + + +
      +
    • + + 2 + Tbsp + + + Olive Oil +
    • +
    • + + 1/2 + tsp + + + Kosher Salt +
    • +
    • + + 1 + pinch + + + Black Pepper +
    • +
    • + + 2 + packages + , diced + + Extra Firm Tofu +
    • +
    +
    +
  4. +
  5. +
    + + + + + +
    + +
    +

    Bake Broccoli

    + + +

    Toss broccoli with oil & salt. Bake for 22 minutes.

    + + +
      +
    • + + 2 + cups + , small florets + + Broccoli +
    • +
    • + + 2 + Tbsp + + + Olive Oil +
    • +
    • + + 1/2 + tsp + + + Kosher Salt +
    • +
    +
    +
  6. +
  7. +
    + + + + + +
    + +
    +

    Simmer Carrots & Ginger

    + + +

    Prepare ingredients. Pre-heat pan. Add all ingredients; cover with water. Cook until soft, about 5 minutes.

    + + +
      +
    • + + 2 + + , sliced + + Carrots +
    • +
    • + + 1 + piece + , peeled + sliced + + Fresh Ginger +
    • +
    • + + + + enough to cover + + Water +
    • +
    • + + 1 + pinch + + + Kosher Salt +
    • +
    +
    +
  8. +
  9. +
    + + + + + +
    + +
    +

    Blend Dressing Ingredients

    + + +

    Transfer carrot-ginger mixture to blender. Add orange juice/zest, miso, sesame oil, honey, rice vinegar. Blend until smooth. Let cool in fridge for 10 minutes. Fold in chives & season.

    + + +
      +
    • + + 1/2 + + , zested + juiced + + Orange +
    • +
    • + + 1 + Tbsp + + + Miso Paste +
    • +
    • + + 1/2 + tsp + + + Sesame Seed Oil +
    • +
    • + + 1/2 + Tbsp + , optional + + Honey +
    • +
    • + + 1/4 + cup + + + Rice Wine Vinegar +
    • +
    • + + 3/8 + cup + + + Olive Oil +
    • +
    • + + 1 + Tbsp + , finely chopped + + Fresh Chives +
    • +
    • + + 1/2 + tsp + + + Kosher Salt +
    • +
    • + + 1 + pinch + + + Black Pepper +
    • +
    +
    +
  10. +
  11. +
    + + + + + +
    + +
    +

    Flavor Beets

    + + +

    Toss beets in oil. Season with salt, pepper & parsley.

    + + +
      +
    • + + 1 + lb + , quartered + + Precooked Beets +
    • +
    • + + 2 + Tbsp + , finely chopped + + Italian Parsley +
    • +
    • + + 1 + Tbsp + + + Olive Oil +
    • +
    • + + 1 + pinch + + + Kosher Salt +
    • +
    • + + 1 + pinch + + + Black Pepper +
    • +
    +
    +
  12. +
  13. +
    + + + + + +
    + +
    +

    Toast Sunflower Seeds

    + + +

    Combine ingredients. Toast in oven for 5 - 7 min or until golden brown.

    + +

    TIP: Place on same sheet as broccoli for easier clean up!

    + +
      +
    • + + 1 + cup + + + Sunflower Seeds +
    • +
    • + + 1 + tsp + + + Olive Oil +
    • +
    • + + 1 + pinch + + + Kosher Salt +
    • +
    +
    +
  14. +
  15. +
    + + + + + +
    + +
    +

    Mixed Greens

    + + +

    Wash greens & dry.

    + + +
      +
    • + + 4 + cups + + + Fresh Spring Mix +
    • +
    +
    +
  16. +
  17. +
    + + + + + +
    + +
    +

    Serve and Enjoy!

    + + +

    Pair with your favorite music!

    + + +
      +
    +
    +
  18. +
+ +
+
+ +
+ + +
+ + +
+
+ +
+
+

Nutrition

+
+ +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Amount per
serving
Daily value percentage
+ Calories + + + 830 kcal + +   +
+ Total Fat + + + 64 g + + 82% +
+ Total Saturated Fat + + + 9 g + + 44% +
+ Unsaturated Fat + + + 55 g + +   +
+ Low Cholesterol + + + + 0 mg + + 0% +
+ Sodium + + + 1060 mg + + 45% +
+ Total Carbohydrate + + + 34 g + + 12% +
+ Good Source: Fiber + + + + 11 g + + 38% +
+ Sugars Total + + + 18 g + +   +
+ Good Source: Protein + + + + 32 g + + 64% +
+ Excellent Source: Vitamin C + + + + 63 mg + + 70% +
+ + Load More +
+
+ +
+ +

+ By Innit Culinary Team +

+
+
+
+
+ + + + + + + +
+ + + + + + diff --git a/tests/test_innit.py b/tests/test_innit.py new file mode 100644 index 000000000..11f8c4b2c --- /dev/null +++ b/tests/test_innit.py @@ -0,0 +1,87 @@ +from tests import ScraperTest + +from recipe_scrapers.innit import Innit + + +class TestInnitScraper(ScraperTest): + + scraper_class = Innit + + def test_host(self): + self.assertEqual("innit.com", self.harvester_class.host()) + + def test_title(self): + self.assertEqual( + "Tofu Mixed Greens Salad with Broccoli Beet Mix & Carrot Ginger Dressing", + self.harvester_class.title(), + ) + + def test_total_time(self): + self.assertEqual(51, self.harvester_class.total_time()) + + def test_yields(self): + self.assertEqual("4 serving(s)", self.harvester_class.yields()) + + def test_ingredients(self): + self.assertEqual( + [ + "2 Carrots", + "1 piece Fresh Ginger", + "1/2 Orange", + "1 Tbsp Fresh Chives", + "2 cups Broccoli", + "1 lb Precooked Beets", + "2 Tbsp Italian Parsley", + "4 cups Fresh Spring Mix", + "2 packages Extra Firm Tofu", + "1 Tbsp Miso Paste", + "1/2 tsp Sesame Seed Oil", + "1/2 Tbsp Honey", + "1 1/3 tsp Kosher Salt", + "2/3 cup Olive Oil", + "2 pinches Black Pepper", + "1/4 cup Rice Wine Vinegar", + "1 cup Sunflower Seeds", + ], + self.harvester_class.ingredients(), + ) + + def test_instructions(self): + self.assertEqual( + """Preheat +Preheat the oven to 425F. +Line sheet pan with foil. +Sear Tofu +Drain, pat dry & prepare tofu. +Heat pan on high heat for 2 minutes. +Cook for 7 min or until golden brown on all sides, seasoning half way. +Remove from pan. +Bake Broccoli +Toss broccoli with oil & salt. +Bake for 22 minutes. +Simmer Carrots & Ginger +Prepare ingredients. +Pre-heat pan. Add all ingredients; cover with water. +Cook until soft, about 5 minutes. +Blend Dressing Ingredients +Transfer carrot-ginger mixture to blender. +Add orange juice/zest, miso, sesame oil, honey, rice vinegar. +Blend until smooth. +Let cool in fridge for 10 minutes. Fold in chives & season. +Flavor Beets +Toss beets in oil. Season with salt, pepper & parsley. +Toast Sunflower Seeds +Combine ingredients. +Toast in oven for 5 - 7 min or until golden brown. +Mixed Greens +Wash greens & dry. +Serve and Enjoy! +Pair with your favorite music!""", + self.harvester_class.instructions(), + ) + + def test_image(self): + self.assertEqual( + "https://www.innit.com/meal-service/en-US/images/Meal-Salads%3A%20Blended-Carrot_Ginger_Dressing%2BAssembled-Broccoli_Beet_Mix%2BSeared-Tofu-Diced%2BOlive_Oil%2BPrepared-Mixed_Greens_480x480.png", + self.harvester_class.image(), + )