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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user