irins commited on
Commit
0563aeb
·
verified ·
1 Parent(s): ad87128

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -60,6 +60,10 @@ def get_recipes(ingredients, max_calories=None, min_protein=None, max_fat=None,
60
  # Extract recipes from the API response
61
  recipes = response.json().get('results', [])
62
  if recipes:
 
 
 
 
63
  # Format and return the list of recipes as HTML links
64
  return "<br>".join(
65
  [f'<a href="https://spoonacular.com/recipes/{recipe["id"]}" target="_blank">{recipe["title"]}</a>'
 
60
  # Extract recipes from the API response
61
  recipes = response.json().get('results', [])
62
  if recipes:
63
+ # Debugging: Print each recipe URL to verify it's correct
64
+ for recipe in recipes:
65
+ print(f"Recipe URL: https://spoonacular.com/recipes/{recipe['id']}") # Print URL for debugging
66
+
67
  # Format and return the list of recipes as HTML links
68
  return "<br>".join(
69
  [f'<a href="https://spoonacular.com/recipes/{recipe["id"]}" target="_blank">{recipe["title"]}</a>'