1
0
Fork 0
mirror of https://github.com/TheThomaas/my-online-cookbook.git synced 2026-01-10 20:01:47 +00:00

Update scraper script

This commit is contained in:
TheThomaas 2023-07-08 16:10:31 +02:00
parent 91d2bc338a
commit 8a3db0cc60

View file

@ -26,7 +26,7 @@ for i, v in enumerate(ingredients_list):
instructions_list = recipe_json["instructions_list"]
instructions = ""
for i, v in enumerate(instructions_list):
instructions += f"{i + 1}. {v}\n"
instructions += f"{i + 1}. {v}\n\n"
def slugify(value, allow_unicode=False):
value = str(value)
@ -66,4 +66,4 @@ f = open(f"src/recipes/{slugify(title)}.md", "w")
f.write(recipesConcat())
f.close()
download_jpg(image_url, r"C:\Users\Thomas\Downloads\recipes-scrapers\src\img\recipes/", slugify(title) )
download_jpg(image_url, r".\src\img\recipes/", slugify(title) )