Skip to content

Commit

Permalink
Ingredient grouping & equipment support for skinnytaste (#1332)
Browse files Browse the repository at this point in the history
  • Loading branch information
jknndy authored Nov 2, 2024
1 parent 57ccef9 commit 1f96ceb
Show file tree
Hide file tree
Showing 5 changed files with 3,504 additions and 1,833 deletions.
22 changes: 22 additions & 0 deletions recipe_scrapers/skinnytaste.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
from ._abstract import AbstractScraper
from ._grouping_utils import group_ingredients


class SkinnyTaste(AbstractScraper):
@classmethod
def host(cls):
return "skinnytaste.com"

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.find(
"div", class_="wprm-recipe-equipment-container"
)
if equipment_container:
return [
item.get_text(strip=True)
for item in equipment_container.find_all(
"div", class_="wprm-recipe-equipment-name"
)
]
return None
Loading

0 comments on commit 1f96ceb

Please sign in to comment.