fix: ingredient parsing — match actual HTML elements and add spaces

The scraper looked for span.quantity/span.unit/span.name which don't
exist. The real HTML uses <strong> for qty, plain <span> for unit,
<a class="ingredients-link"> for name, and <small> for extras like
"(darált)". Also add referenceId to Mealie ingredients (required field).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 08:11:28 +01:00
parent 9a59b38fd6
commit 0192de5177
2 changed files with 22 additions and 8 deletions
+1
View File
@@ -69,6 +69,7 @@ class MealieClient:
ingredients = []
for line in recipe.get("ingredients", []):
ingredients.append({
"referenceId": uuid.uuid4().hex,
"note": line,
"isFood": False,
"disableAmount": True,