Skip to content

Commit

Permalink
Update simplycookit.py
Browse files Browse the repository at this point in the history
Co-authored-by: James Addison <[email protected]>
  • Loading branch information
jknndy and jayaddison authored Nov 13, 2024
1 parent d0e5df5 commit 3f948a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions recipe_scrapers/simplycookit.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ def ingredient_groups(self):
current_group = None

for li in self.soup.find("ul", {"class": "recipe_ingredients"}).findAll("li"):
h3 = li.find("h3")
if h3:
group_heading = li.find("h3")
if group_heading:
if current_group:
ingredient_groups.append(current_group)
current_group = IngredientGroup(
ingredients=[], purpose=normalize_string(h3.get_text())
ingredients=[], purpose=normalize_string(group_heading.get_text())
)
else:
text = normalize_string(li.get_text())
Expand Down

0 comments on commit 3f948a1

Please sign in to comment.