From 09df317a7526860ee2efa49185a133d7a1bdfd7f Mon Sep 17 00:00:00 2001 From: Joey <7505194+jknndy@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:21:59 -0700 Subject: [PATCH] Adds support for hungryhappens (#1278) * hungryhappens * Update recipe_scrapers/hungryhappens.py Co-authored-by: James Addison <55152140+jayaddison@users.noreply.github.com> --------- Co-authored-by: James Addison <55152140+jayaddison@users.noreply.github.com> --- README.rst | 1 + recipe_scrapers/__init__.py | 2 + recipe_scrapers/hungryhappens.py | 29 + .../hungryhappens.net/hungryhappens_1.json | 55 + .../hungryhappens_1.testhtml | 997 ++++++++++++++++++ .../hungryhappens.net/hungryhappens_2.json | 88 ++ .../hungryhappens_2.testhtml | 797 ++++++++++++++ 7 files changed, 1969 insertions(+) create mode 100644 recipe_scrapers/hungryhappens.py create mode 100644 tests/test_data/hungryhappens.net/hungryhappens_1.json create mode 100644 tests/test_data/hungryhappens.net/hungryhappens_1.testhtml create mode 100644 tests/test_data/hungryhappens.net/hungryhappens_2.json create mode 100644 tests/test_data/hungryhappens.net/hungryhappens_2.testhtml diff --git a/README.rst b/README.rst index 17fe2312a..e01feeada 100644 --- a/README.rst +++ b/README.rst @@ -233,6 +233,7 @@ Scrapers available for: - `https://www.hersheyland.com/ `_ - `https://www.homechef.com/ `_ - `https://hostthetoast.com/ `_ +- `https://hungryhappens.net/ `_ - `https://www.ica.se/ `_ - `https://www.im-worthy.com/ `_ - `https://inbloombakery.com/ `_ diff --git a/recipe_scrapers/__init__.py b/recipe_scrapers/__init__.py index 88c3fff92..8f737caaa 100644 --- a/recipe_scrapers/__init__.py +++ b/recipe_scrapers/__init__.py @@ -183,6 +183,7 @@ from .hersheyland import HersheyLand from .homechef import HomeChef from .hostthetoast import Hostthetoast +from .hungryhappens import HungryHappens from .ica import Ica from .ig import IG from .imworthy import ImWorthy @@ -511,6 +512,7 @@ GourmetTraveller.host(): GourmetTraveller, GrandFrais.host(): GrandFrais, HeatherChristo.host(): HeatherChristo, + HungryHappens.host(): HungryHappens, InBloomBakery.host(): InBloomBakery, InGoodFlavor.host(): InGoodFlavor, JoCooks.host(): JoCooks, diff --git a/recipe_scrapers/hungryhappens.py b/recipe_scrapers/hungryhappens.py new file mode 100644 index 000000000..634663425 --- /dev/null +++ b/recipe_scrapers/hungryhappens.py @@ -0,0 +1,29 @@ +from ._abstract import AbstractScraper +from ._grouping_utils import group_ingredients +from ._utils import get_equipment + + +class HungryHappens(AbstractScraper): + @classmethod + def host(cls): + return "hungryhappens.net" + + 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.select_one(".wprm-recipe-equipment-container") + if not equipment_container: + return None + + equipment_items = [ + item.select_one(".wprm-recipe-equipment-name").get_text(strip=True) + for item in equipment_container.select(".wprm-recipe-equipment-item") + if item.select_one(".wprm-recipe-equipment-name") + ] + return get_equipment(equipment_items) diff --git a/tests/test_data/hungryhappens.net/hungryhappens_1.json b/tests/test_data/hungryhappens.net/hungryhappens_1.json new file mode 100644 index 000000000..8c4735ca7 --- /dev/null +++ b/tests/test_data/hungryhappens.net/hungryhappens_1.json @@ -0,0 +1,55 @@ +{ + "author": "Stella", + "canonical_url": "https://hungryhappens.net/one-pot-vegetable-tortellini-soup/", + "site_name": "Hungry Happens", + "host": "hungryhappens.net", + "language": "en-US", + "title": "One Pot Vegetable Tortellini Soup", + "ingredients": [ + "1/4 cup olive oil", + "1 medium sweet onion, (diced)", + "4 medium carrots, (diced)", + "12 oz mushrooms, (diced)", + "4 celery ribs, (diced)", + "4 cloves garlic, (minced)", + "1 tsp paprika", + "1 tbs Italian herb seasoning", + "salt and pepper (to taste)", + "2 tbs tomato paste", + "1/2 cup dry white wine", + "7 cups low sodium vegetable or chicken broth", + "1½ lb cheese tortellini", + "1/2 cup grated parmesan cheese", + "1/2 cup heavy cream", + "3 handfuls kale, (chopped)" + ], + "instructions_list": [ + "In a large pot, heat your oil on high. Once hot, add in the carrots and onion to saute for 3 minutes. Add in the mushrooms and celery and mix to combine and saute all for another few minutes. Next stir in the garlic for 30 seconds.", + "Add in the paprika, Italian herb seasonings, salt and pepper to taste and tomato paste and stir to coat all. Next add in the wine and broth and bring to a boil. Simmer covered for 20 minutes or until the carrots are tender.", + "Add in the tortellini and grated parmesan and boil for 5 minutes. Lastly stir in the heavy cream and kale - gently.", + "Optional: Top with freshly grated parmesan, a light drizzle of olive oil and enjoy!" + ], + "yields": "4 servings", + "total_time": 45, + "cook_time": 30, + "prep_time": 15, + "ratings": 4.96, + "ratings_count": 68, + "equipment": [ + "large pot" + ], + "nutrients": { + "servingSize": "1 serving", + "calories": "944 kcal", + "fatContent": "43 g", + "saturatedFatContent": "16 g", + "unsaturatedFatContent": "15 g", + "carbohydrateContent": "101 g", + "sugarContent": "18 g", + "proteinContent": "37 g", + "sodiumContent": "1100 mg", + "fiberContent": "13 g", + "cholesterolContent": "109 mg" + }, + "image": "https://hungryhappens.net/wp-content/uploads/2022/12/IMG_2810-scaled.jpeg" +} diff --git a/tests/test_data/hungryhappens.net/hungryhappens_1.testhtml b/tests/test_data/hungryhappens.net/hungryhappens_1.testhtml new file mode 100644 index 000000000..1cff18600 --- /dev/null +++ b/tests/test_data/hungryhappens.net/hungryhappens_1.testhtml @@ -0,0 +1,997 @@ + + + + + + + + + + + + + + + One Pot Vegetable Tortellini Soup - Hungry Happens + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+

One Pot Vegetable Tortellini Soup

+ + +
+ +
+ Perfectly flavored cozy soup that will nourish and comfort your loved ones.
+
+
+
+ + + + + + +
+
@hungryhappens

One Pot Vegetable Tortellini Soup (full recipe is on: HungryHappens.Net)

♬ original sound – Stella Drivas

This soup is the gift that keeps on giving. Its vegetarian and super satisfying nonetheless. The perfect way to use up your veggies and that frozen tortellini. If you don’t like kale, feel free to sub in baby spinach or roughly chopped Swiss chard in its place. You can use milk in place of the heavy cream or just leave it out and it will still taste great! You can also use gnocchi instead of the tortellini or any medium to small sized pasta.

+ + + +

If you like this soup recipe then you will LOVE my BEST TORTELLINI SOUP (with sausage) or my TORTELLINI AVGOLEMONO SOUP or my EASY CHICKEN VEGETABLE SOUP!

+ + + +

Thank you for swinging by HungryHappens! If you create this dish or any other from our site, we would greatly appreciate you taking the time to comment and rate the recipe! LOVE YOUR LIFE!

+ + +
+ +
+
vegetable tortellini soup
+ +

One Pot Vegetable Tortellini Soup

+ +
+
+ +
+ +
4.96 from 68 votes
+ +
Servings: 4
Prep Time: 15 minutes
Cook Time: 30 minutes
Total Time: 45 minutes
+
+ + + +

Equipment

+ +

Ingredients 

  • 1/4 cup olive oil
  • 1 medium sweet onion, diced
  • 4 medium carrots, diced
  • 12 oz mushrooms, diced
  • 4 celery ribs, diced
  • 4 cloves garlic, minced
  • 1 tsp paprika
  • 1 tbs Italian herb seasoning
  • salt and pepper to taste
  • 2 tbs tomato paste
  • 1/2 cup dry white wine
  • 7 cups low sodium vegetable or chicken broth
  • lb cheese tortellini
  • 1/2 cup grated parmesan cheese
  • 1/2 cup heavy cream
  • 3 handfuls kale, chopped
+ +

Instructions

  • In a large pot, heat your oil on high. Once hot, add in the carrots and onion to saute for 3 minutes. Add in the mushrooms and celery and mix to combine and saute all for another few minutes. Next stir in the garlic for 30 seconds.
  • Add in the paprika, Italian herb seasonings, salt and pepper to taste and tomato paste and stir to coat all. Next add in the wine and broth and bring to a boil. Simmer covered for 20 minutes or until the carrots are tender.
  • Add in the tortellini and grated parmesan and boil for 5 minutes. Lastly stir in the heavy cream and kale – gently.
  • Optional: Top with freshly grated parmesan, a light drizzle of olive oil and enjoy!
+ +

Notes

If you want a sub for kale, you can use baby spinach or swiss chard. You can also use chicken broth for the vegetable broth.. which I actually prefer.
+ +

Nutrition

Calories: 944kcal | Carbohydrates: 101g | Protein: 37g | Fat: 43g | Saturated Fat: 16g | Polyunsaturated Fat: 2g | Monounsaturated Fat: 13g | Cholesterol: 109mg | Sodium: 1100mg | Potassium: 829mg | Fiber: 13g | Sugar: 18g | Vitamin A: 13388IU | Vitamin C: 37mg | Calcium: 486mg | Iron: 6mg
+ + +
+ +
+
+
+

You might also like

+ +
+
+ +
+ + +
+ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/test_data/hungryhappens.net/hungryhappens_2.json b/tests/test_data/hungryhappens.net/hungryhappens_2.json new file mode 100644 index 000000000..e9a036560 --- /dev/null +++ b/tests/test_data/hungryhappens.net/hungryhappens_2.json @@ -0,0 +1,88 @@ +{ + "author": "Stella", + "canonical_url": "https://hungryhappens.net/crispy-salmon-tacos/", + "site_name": "Hungry Happens", + "host": "hungryhappens.net", + "language": "en-US", + "title": "Crispy Salmon Tacos", + "ingredients": [ + "1/2 head green cabbage, (fine shredded)", + "1/2 large cucumber", + "3 tbs dill, (chopped)", + "1/4 cup champagne vinegar ((or white wine vinegar))", + "salt and pepper (to taste)", + "3 avocadoes", + "2 tsp Sriracha sauce", + "1 lime, (juiced)", + "salt and pepper (to taste)", + "2 lbs salmon, (skin removed)", + "2 tsp chipotle powder ((or chili powder))", + "1 tsp onion powder", + "1 tsp dried oregano", + "1 lime, (zested + juiced)", + "8 small corn tortillas" + ], + "ingredient_groups": [ + { + "ingredients": [ + "1/2 head green cabbage, (fine shredded)", + "1/2 large cucumber", + "3 tbs dill, (chopped)", + "1/4 cup champagne vinegar ((or white wine vinegar))", + "salt and pepper (to taste)" + ], + "purpose": "Slaw:" + }, + { + "ingredients": [ + "3 avocadoes", + "2 tsp Sriracha sauce", + "1 lime, (juiced)", + "salt and pepper (to taste)" + ], + "purpose": "Spicy Avocado Mash:" + }, + { + "ingredients": [ + "2 lbs salmon, (skin removed)", + "2 tsp chipotle powder ((or chili powder))", + "1 tsp onion powder", + "1 tsp dried oregano", + "1 lime, (zested + juiced)", + "8 small corn tortillas" + ], + "purpose": "Salmon:" + } + ], + "instructions_list": [ + "Slaw:", + "Leave the skin on your cucumber. Slice your cucumber in half lengthwise. Remove seeds and then slice thin.", + "Mix everyhting in a large bowl, cover and place in your fridge while you make everything else.", + "Avocado Mash:", + "In a medium bowl, rough mash your avocados. Add in the rest of the ingredients and mix to combine. Taste and adjust the sriracha if needed.", + "Salmon:", + "Pat your fish dry with paper towel. Slice the filet into large chunks. Transfer to a bowl and mix with the seasonings, lime zest and juice to coat.", + "In a large skillet, working in two batches, add 1/2 tbs olive oil. Once pan is hot add in the salmon pieces and cook until crispy and done. Remove to a plate lined with paper towel. Wipe the pan clean and repeat with the rest of the salmon.", + "Heat your tortillas in a pan or wrapped in a stack, in aluminum foil in your small toaster oven." + ], + "yields": "4 servings", + "total_time": 30, + "cook_time": 10, + "prep_time": 20, + "ratings": 4.94, + "ratings_count": 32, + "nutrients": { + "servingSize": "1 serving", + "calories": "728 kcal", + "fatContent": "38 g", + "saturatedFatContent": "6 g", + "unsaturatedFatContent": "29 g", + "carbohydrateContent": "48 g", + "sugarContent": "6 g", + "proteinContent": "53 g", + "sodiumContent": "200 mg", + "fiberContent": "18 g", + "cholesterolContent": "125 mg" + }, + "image": "https://hungryhappens.net/wp-content/uploads/2022/04/JPEG-image-110-scaled.jpeg" +} diff --git a/tests/test_data/hungryhappens.net/hungryhappens_2.testhtml b/tests/test_data/hungryhappens.net/hungryhappens_2.testhtml new file mode 100644 index 000000000..370be3c1b --- /dev/null +++ b/tests/test_data/hungryhappens.net/hungryhappens_2.testhtml @@ -0,0 +1,797 @@ + + + + + + + + + + + + + + + Crispy Salmon Tacos - Hungry Happens + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+

Crispy Salmon Tacos

+ + +
+ +
+ These tacos are spicy, refreshing, healthy and SO DELICIOUS.
+
+
+
+ + + + + + +
+
@hungryhappens

Crispy Salmon Tacos @danosseasoning #danosseasoning #danospartner (full recipe is on my site: HungryHappens.Net)

♬ On The Dance Floor (Instrumental) – BLVKSHP

Still trying to wrap my head around how yummy yet good-for-you these are. A titanic combination of spicy, tangy and creamy. The salmon is cooked to crispy perfection in a matter of minutes and the slaw and guac are the ideal accompaniments. And we are leaving out the usual taco fixins of cheese, sour cream, etc. without giving in on taste.

+ + + +

method:

+ + + +

For the salmon the process and ingredients are so so simple. I am loving the crispy salmon recipes so much so we have been applying them to some of our favorite meals. The beauty of this recipe is you can pan fry them or AIR FRY them and you will get the same crispy result.

+ + + +

slaw + Avocado mash:

+ + + +

These tacos are nothing without the simple cabbage slaw and too easy avocado mash. Make sure you make the slaw at the beginning of the process so it has time to marinate and break down in the fridge. You will love this recipe – I promise!

+ + + +

Thank you for swinging by Hungry Happens! If you create this dish or any other from our site, we would greatly appreciate it if you could leave a comment and rate the recipe! LOVE YOUR LIFE!

+ + +
+ +
+
crispy salmon tacos
+ +

Crispy Salmon Tacos

+ +
+
+ +
+ +
4.94 from 32 votes
+ +
Servings: 4
Prep Time: 20 minutes
Cook Time: 10 minutes
Total Time: 30 minutes
+
+ + + + + +

Ingredients 

Slaw:

  • 1/2 head green cabbage, fine shredded
  • 1/2 large cucumber
  • 3 tbs dill, chopped
  • 1/4 cup champagne vinegar (or white wine vinegar)
  • salt and pepper to taste

Spicy Avocado Mash:

Salmon:

  • 2 lbs salmon, skin removed
  • 2 tsp chipotle powder (or chili powder)
  • 1 tsp onion powder
  • 1 tsp dried oregano
  • 1 lime, zested + juiced
  • 8 small corn tortillas
+ +

Instructions

Slaw:

  • Leave the skin on your cucumber. Slice your cucumber in half lengthwise. Remove seeds and then slice thin.
  • Mix everyhting in a large bowl, cover and place in your fridge while you make everything else.

Avocado Mash:

  • In a medium bowl, rough mash your avocados. Add in the rest of the ingredients and mix to combine. Taste and adjust the sriracha if needed.

Salmon:

  • Pat your fish dry with paper towel. Slice the filet into large chunks. Transfer to a bowl and mix with the seasonings, lime zest and juice to coat.
  • In a large skillet, working in two batches, add 1/2 tbs olive oil. Once pan is hot add in the salmon pieces and cook until crispy and done. Remove to a plate lined with paper towel. Wipe the pan clean and repeat with the rest of the salmon.
  • Heat your tortillas in a pan or wrapped in a stack, in aluminum foil in your small toaster oven.
+ +

Notes

Recipe inspired by the great Ina Garten
+ +

Nutrition

Calories: 728kcal | Carbohydrates: 48g | Protein: 53g | Fat: 38g | Saturated Fat: 6g | Polyunsaturated Fat: 9g | Monounsaturated Fat: 20g | Cholesterol: 125mg | Sodium: 200mg | Potassium: 2254mg | Fiber: 18g | Sugar: 6g | Vitamin A: 795IU | Vitamin C: 69mg | Calcium: 164mg | Iron: 5mg
+ + +
+ +
+
+
+

You might also like

+ +
+
+ +
+ + +
+ + + + + + + + + + + + + + + + + + \ No newline at end of file