Skip to content

Commit

Permalink
Adds support for wedishitup (#1389)
Browse files Browse the repository at this point in the history
  • Loading branch information
jknndy authored Dec 7, 2024
1 parent a0fdda2 commit 071c617
Show file tree
Hide file tree
Showing 7 changed files with 3,823 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ Scrapers available for:
- `https://www.waitrose.com/ <https://www.waitrose.com/>`_
- `https://watchwhatueat.com/ <https://watchwhatueat.com/>`_
- `https://wearenotmartha.com/ <https://wearenotmartha.com/>`_
- `https://wedishitup.com/ <https://wedishitup.com/>`_
- `https://www.weightwatchers.com/ <https://www.weightwatchers.com/>`_ (*)
- `https://www.wellplated.com/ <https://www.wellplated.com/>`_
- `https://whatsgabycooking.com/ <https://whatsgabycooking.com>`_
Expand Down
2 changes: 2 additions & 0 deletions recipe_scrapers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@
from .waitrose import Waitrose
from .watchwhatueat import WatchWhatUEat
from .wearenotmartha import WeAreNotMartha
from .wedishitup import WeDishItUp
from .weightwatchers import WeightWatchers
from .weightwatcherspublic import WeightWatchersPublic
from .wellplated import WellPlated
Expand Down Expand Up @@ -823,6 +824,7 @@
Waitrose.host(): Waitrose,
WatchWhatUEat.host(): WatchWhatUEat,
WeAreNotMartha.host(): WeAreNotMartha,
WeDishItUp.host(): WeDishItUp,
WeightWatchers.host(): WeightWatchers,
WeightWatchersPublic.host(): WeightWatchersPublic,
WellPlated.host(): WellPlated,
Expand Down
31 changes: 31 additions & 0 deletions recipe_scrapers/wedishitup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from ._abstract import AbstractScraper
from ._grouping_utils import group_ingredients
from ._utils import get_equipment


class WeDishItUp(AbstractScraper):
@classmethod
def host(cls):
return "wedishitup.com"

def equipment(self):
equipment_container = self.soup.find(
"div", class_="wprm-recipe-equipment-container"
)
if not equipment_container:
return None
equipment_items = [
item.get_text(strip=True)
for item in equipment_container.find_all(
"div", class_="wprm-recipe-equipment-name"
)
]
return get_equipment(equipment_items)

def ingredient_groups(self):
return group_ingredients(
self.ingredients(),
self.soup,
".wprm-recipe-ingredient-group h4",
".wprm-recipe-ingredient",
)
65 changes: 65 additions & 0 deletions tests/test_data/wedishitup.com/wedishitup_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"author": "Stacy Roman",
"canonical_url": "https://wedishitup.com/2530/copy-cat-nacho-bell-grande/",
"site_name": "We Dish It Up",
"host": "wedishitup.com",
"language": "en-US",
"title": "Copy Cat Nacho Bell Grande",
"ingredients": [
"1 10-13 oz Bag Tortilla Chips",
"1 lb Ground Beef",
"1 13 oz Can Refried Beans",
"1 12 oz Jar Nacho Cheese (Store-Bought )",
"6-8 oz Sour Cream",
"1 medium Tomato (Diced)",
"Green Onions (Optional)",
"Jalapenos (Optional)",
"Salsa or Hot Sauce (Optional)",
"Guacamole (Optional)"
],
"instructions_list": [
"Dump Tortilla Chips out on a Platter",
"In a Medium Fry Pan -Cook and break up the ground Beef-add Taco Seasoning and water as directed on seasoning",
"Heat Beans and Nacho Cheese in Microwave",
"Scoop beans on to chips using an ice cream scoop works best but go with what you have",
"Spread ground beef over chips and beans",
"Pour hot nacho cheese over chips , beans, and beef",
"Sprinkle tomatoes over nachos",
"Top with sour cream and other optional garnishes Serve and Enjoy"
],
"category": "Appetizer",
"yields": "6 servings",
"description": "Chips with Beans , Ground Beef, Nacho Cheese, Sour Cream and Tomatoes",
"total_time": 10,
"cook_time": 5,
"prep_time": 5,
"cuisine": "Mexican",
"ratings": 3.17,
"ratings_count": 6,
"equipment": [
"stove, large pan, knife, cutting board",
"Microwave"
],
"nutrients": {
"servingSize": "1 serving",
"calories": "212 kcal",
"fatContent": "17 g",
"saturatedFatContent": "6 g",
"unsaturatedFatContent": "9 g",
"transFatContent": "1 g",
"carbohydrateContent": "2 g",
"sugarContent": "1 g",
"proteinContent": "13 g",
"sodiumContent": "55 mg",
"fiberContent": "1 g",
"cholesterolContent": "54 mg"
},
"image": "https://wedishitup.com/wp-content/uploads/2019/12/Copy-Cat-Nacho-Bell-2.jpg",
"keywords": [
"Appetizer",
"Bell",
"Grande",
"Nachos",
"Taco Bell"
]
}
1,933 changes: 1,933 additions & 0 deletions tests/test_data/wedishitup.com/wedishitup_1.testhtml

Large diffs are not rendered by default.

82 changes: 82 additions & 0 deletions tests/test_data/wedishitup.com/wedishitup_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"author": "Stacy Roman",
"canonical_url": "https://wedishitup.com/14176/sheet-pan-ranch-chicken-thighs/",
"site_name": "We Dish It Up",
"host": "wedishitup.com",
"language": "en-US",
"title": "Sheet Pan Ranch Chicken Thighs",
"ingredients": [
"1 pkt Ranch Seasoning",
"1/2 cup Olive Oil",
"2 tbsp Garlic Herb Seasoning",
"4-6 Chicken Thighs (Bone in Skin On)",
"4 Apples (Peeled, Cored and Sliced)",
"2 cups Baby Carrots",
"2 Red Onions (Thinly Sliced)",
"6-8 Red Potatoes (Sliced in Half)",
"Chopped Parsley"
],
"ingredient_groups": [
{
"ingredients": [
"1 pkt Ranch Seasoning",
"1/2 cup Olive Oil",
"2 tbsp Garlic Herb Seasoning"
],
"purpose": "Chicken Marinade"
},
{
"ingredients": [
"4-6 Chicken Thighs (Bone in Skin On)",
"4 Apples (Peeled, Cored and Sliced)",
"2 cups Baby Carrots",
"2 Red Onions (Thinly Sliced)",
"6-8 Red Potatoes (Sliced in Half)",
"Chopped Parsley"
],
"purpose": "Chicken and Vegetables"
}
],
"instructions_list": [
"Pre-heat oven to 400 °",
"In a small mixing bowl , combine ranch seasoning , garlic herb seasoning and olive oil, Whisk together.",
"In a large bowl place chicken thighs and pour half of the marinade over the chicken and toss to coat well.",
"Next, refrigerate marinated chicken for 20-30 minutes well doing the other prepping of veggies.",
"Chop and slice apples and veggies.",
"Spray a baking pan with nonstick spray , arrange vegetables on baking sheet pour remaining marinade on veggies.",
"Add chicken to pan and bake for 35-40 minutes until internal temperature of chicken reaches 165°",
"Serve hot"
],
"category": "dinner",
"yields": "4 servings",
"description": "Sheet Pan Ranch Chicken Thighs are the perfect weeknight dinner. Chicken Thighs, baby carrots, red potatoes, apples, red onion, and seasonings. It can all be thrown together on one pan and ready in less than an hour. You can't beat that am I right?",
"total_time": 85,
"cook_time": 40,
"prep_time": 15,
"cuisine": "American",
"equipment": [
"OVEN",
"Sheet Pan",
"Mixing Bowl"
],
"nutrients": {
"servingSize": "1 serving",
"calories": "730 kcal",
"fatContent": "33 g",
"saturatedFatContent": "7 g",
"unsaturatedFatContent": "24 g",
"transFatContent": "0.1 g",
"carbohydrateContent": "87 g",
"sugarContent": "28 g",
"proteinContent": "26 g",
"sodiumContent": "217 mg",
"fiberContent": "13 g",
"cholesterolContent": "111 mg"
},
"image": "https://wedishitup.com/wp-content/uploads/2022/09/Ranch-Chicken-Sheet-Pan-2-1-2.jpg",
"keywords": [
"Chicken Thighs",
"Dinner",
"Sheet Pan"
]
}
Loading

0 comments on commit 071c617

Please sign in to comment.