diff --git a/recipe_scrapers/maangchi.py b/recipe_scrapers/maangchi.py index 3656ed1d7..57b557765 100644 --- a/recipe_scrapers/maangchi.py +++ b/recipe_scrapers/maangchi.py @@ -1,3 +1,5 @@ +import re + from ._abstract import AbstractScraper from ._utils import normalize_string @@ -8,7 +10,9 @@ def host(cls): return "maangchi.com" def ingredients(self): - before = self.soup.find("h2", string="Ingredients").find_all_next("li") + before = self.soup.find("h2", string=re.compile(r"Ingredients")).find_all_next( + "li" + ) after = self.soup.find("h2", string="Directions").find_all_previous("li") list_before = [normalize_string(b.get_text()) for b in before] list_after = [normalize_string(a.get_text()) for a in after]