mirror of
https://github.com/TheThomaas/my-online-cookbook.git
synced 2026-01-11 04:11:47 +00:00
Update scraper script
This commit is contained in:
parent
91d2bc338a
commit
8a3db0cc60
|
|
@ -26,7 +26,7 @@ for i, v in enumerate(ingredients_list):
|
||||||
instructions_list = recipe_json["instructions_list"]
|
instructions_list = recipe_json["instructions_list"]
|
||||||
instructions = ""
|
instructions = ""
|
||||||
for i, v in enumerate(instructions_list):
|
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):
|
def slugify(value, allow_unicode=False):
|
||||||
value = str(value)
|
value = str(value)
|
||||||
|
|
@ -66,4 +66,4 @@ f = open(f"src/recipes/{slugify(title)}.md", "w")
|
||||||
f.write(recipesConcat())
|
f.write(recipesConcat())
|
||||||
f.close()
|
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) )
|
||||||
Loading…
Reference in a new issue