Skip to content

Commit

Permalink
Refactor: remove use of 'while' loop (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayaddison committed Oct 12, 2022
1 parent 5c033fb commit 753c054
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions recipe_scrapers/nutritionbynathalie.py
Expand Up @@ -36,8 +36,7 @@ def ingredients(self):
title = outerElement.find_parent("p")
if not title:
continue
element = title.nextSibling
while element:
for element in title.next_siblings:
ingredient = element.get_text()
if len(ingredient) == 0 or ord(ingredient[0]) != BULLET_CHARACTER_ORD:
break
Expand Down

0 comments on commit 753c054

Please sign in to comment.