servings default to 1 on import
This commit is contained in:
@ -224,7 +224,7 @@ def find_recipe_json(ld_json, url):
|
|||||||
ld_json['servings'] = int(re.findall(r'\b\d+\b', ld_json['recipeYield'])[0])
|
ld_json['servings'] = int(re.findall(r'\b\d+\b', ld_json['recipeYield'])[0])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
ld_json['servings'] = 0
|
ld_json['servings'] = 1
|
||||||
|
|
||||||
for key in list(ld_json):
|
for key in list(ld_json):
|
||||||
if key not in [
|
if key not in [
|
||||||
|
Reference in New Issue
Block a user