Gosse Minnema
commited on
Commit
•
1c69cf4
1
Parent(s):
2454a5f
Bugfix: save all the parsed recipes (instead of just the first one)
Browse files
scrape.py
CHANGED
@@ -41,9 +41,9 @@ def parse_recipes():
|
|
41 |
recipe_data = parse_recipe(recipe_file)
|
42 |
recipes.append({"filename": recipe_file, "recipe_data": recipe_data})
|
43 |
with open("recipes_parsed.json", "w") as f:
|
44 |
-
json.dump(
|
45 |
with open("recipes_parsed.mini.json", "w") as f:
|
46 |
-
json.dump(
|
47 |
|
48 |
|
49 |
def parse_recipe(filename):
|
|
|
41 |
recipe_data = parse_recipe(recipe_file)
|
42 |
recipes.append({"filename": recipe_file, "recipe_data": recipe_data})
|
43 |
with open("recipes_parsed.json", "w") as f:
|
44 |
+
json.dump(recipes, f, ensure_ascii=False, indent=4)
|
45 |
with open("recipes_parsed.mini.json", "w") as f:
|
46 |
+
json.dump(recipes, f, ensure_ascii=True)
|
47 |
|
48 |
|
49 |
def parse_recipe(filename):
|