diff --git a/cookbook/helper/recipe_url_import.py b/cookbook/helper/recipe_url_import.py index c75115fc..efa2dbb9 100644 --- a/cookbook/helper/recipe_url_import.py +++ b/cookbook/helper/recipe_url_import.py @@ -77,7 +77,7 @@ def find_recipe_json(ld_json, url, space): if 'recipeCuisine' in ld_json: keywords += listify_keywords(ld_json['recipeCuisine']) try: - ld_json['keywords'] = parse_keywords(list(set(map(str.casefold, keywords)))) + ld_json['keywords'] = parse_keywords(list(set(map(str.casefold, keywords))), space) except TypeError: pass @@ -179,7 +179,7 @@ def get_from_scraper(scrape, space): ingredients = [] for x in scrape.ingredients(): try: - amount, unit, ingredient, note = parse_ingredient(x) + amount, unit, ingredient, note = parse_single_ingredient(x) if ingredient: ingredients.append( { diff --git a/cookbook/templates/import_json.html b/cookbook/templates/import_json.html index ce778056..7d0058fa 100644 --- a/cookbook/templates/import_json.html +++ b/cookbook/templates/import_json.html @@ -137,7 +137,7 @@ this.error = undefined this.parsed = true this.loading = true - this.$http.post("{% url 'api_recipe_from_html' %}", {'html_text': this.html_recipe}, {emulateJSON: true}).then((response) => { + this.$http.post("{% url 'api_manual_recipe_from_json' %}", {'html_text': this.html_recipe}, {emulateJSON: true}).then((response) => { console.log(response.data) this.recipe_data = response.data['recipe_data']; this.recipe_tree = response.data['recipe_tree']; diff --git a/cookbook/templates/import_json_working.html b/cookbook/templates/import_json_working.html index 1604ece1..6c2d6fce 100644 --- a/cookbook/templates/import_json_working.html +++ b/cookbook/templates/import_json_working.html @@ -152,7 +152,7 @@ this.error = undefined this.parsed = true this.loading = true - this.$http.post("{% url 'api_recipe_from_html' %}", {'html_text': this.html_recipe}, {emulateJSON: true}).then((response) => { + this.$http.post("{% url 'api_manual_recipe_from_json' %}", {'html_text': this.html_recipe}, {emulateJSON: true}).then((response) => { console.log(response.data) this.recipe_data = response.data['recipe_data']; this.recipe_tree = response.data['recipe_tree']; diff --git a/cookbook/templates/url_import.html b/cookbook/templates/url_import.html index 3b564b44..8285c77e 100644 --- a/cookbook/templates/url_import.html +++ b/cookbook/templates/url_import.html @@ -52,7 +52,7 @@