Files
hello-fresh-scraper/recipe-picker.py
2021-10-03 15:18:16 -05:00

12 lines
299 B
Python

import json
import os
import random
pwd = os.getcwd()
print(pwd)
recipesdict = {}
with open(pwd + "\\recipes.json", "r", encoding="utf8") as file:
recipesdict = json.load(file)
recipes = list(recipesdict.keys())
for x in range(5):
print(recipesdict[recipes[random.randint(0,len(recipes))]])