Skip to content

Commit

Permalink
Refactor: remove use of 'while' loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jayaddison committed Oct 12, 2022
1 parent ef43697 commit 6befc1d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions recipe_scrapers/reishunger.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ def instructions(self):
results = []

# locate the first recipe instruction
content_area = heading.parent.parent
step = content_area.find("div", {"class": "leading-normal"})
step1 = heading.parent.parent.find("div", {"class": "leading-normal"})

# iterate through each step in the recipe
while step:
for step in step1.next_siblings:

# check whether the instruction has a list of preparations
# fixme: this can throw an exception if 'step' is not a bs4 Tag
Expand Down

0 comments on commit 6befc1d

Please sign in to comment.