improved servings parser

This commit is contained in:
vabene1111
2023-02-11 09:04:05 +01:00
parent ed92926ec4
commit 820c9b704f

View File

@@ -322,6 +322,11 @@ def parse_servings_text(servings):
servings = re.sub("\d+", '', servings).strip()
except Exception:
servings = ''
if type(servings) == list:
try:
servings = parse_servings_text(servings[1])
except Exception:
pass
return str(servings)[:32]