mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-09 08:08:24 -05:00
return steps in importer
This commit is contained in:
@@ -155,7 +155,7 @@ def get_from_scraper(scrape, request):
|
|||||||
|
|
||||||
# assign steps
|
# assign steps
|
||||||
try:
|
try:
|
||||||
for i in parse_instructions(scrape.instructions()):
|
for i in parse_instructions(scrape.instructions_list()):
|
||||||
recipe_json['steps'].append({
|
recipe_json['steps'].append({
|
||||||
'instruction': i,
|
'instruction': i,
|
||||||
'ingredients': [],
|
'ingredients': [],
|
||||||
@@ -177,11 +177,11 @@ def get_from_scraper(scrape, request):
|
|||||||
for x in scrape.ingredients():
|
for x in scrape.ingredients():
|
||||||
if x.strip() != '':
|
if x.strip() != '':
|
||||||
try:
|
try:
|
||||||
amount, unit, ingredient, note = ingredient_parser.parse(x)
|
amount, unit, food, note = ingredient_parser.parse(x)
|
||||||
ingredient = {
|
ingredient = {
|
||||||
'amount': amount,
|
'amount': amount,
|
||||||
'food': {
|
'food': {
|
||||||
'name': ingredient,
|
'name': food,
|
||||||
},
|
},
|
||||||
'unit': None,
|
'unit': None,
|
||||||
'note': note,
|
'note': note,
|
||||||
|
|||||||
Reference in New Issue
Block a user