screw up ingredient parser

This commit is contained in:
vabene1111
2022-04-23 01:21:13 +02:00
parent 1a21659b5e
commit 9b132e71f2
3 changed files with 31 additions and 26 deletions

View File

@@ -1190,6 +1190,11 @@ def recipe_from_source(request):
'error': True,
'msg': _('Connection Refused.')
}, status=400)
except requests.exceptions.MissingSchema:
return JsonResponse({
'error': True,
'msg': _('Bad URL Schema.')
}, status=400)
recipe_json, recipe_tree, recipe_html, recipe_images = get_recipe_from_source(data, url, request)
if len(recipe_tree) == 0 and len(recipe_json) == 0:
return JsonResponse({