From 9ccb251801b14da5f0d5797c30edd46546e7dea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Koz=C5=82owski?= Date: Sat, 7 Jan 2023 15:45:14 +0100 Subject: [PATCH] output_folder fix --- image_download.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image_download.py b/image_download.py index 3e68351..99de7ea 100644 --- a/image_download.py +++ b/image_download.py @@ -44,7 +44,7 @@ def main(args): title = row[1]['title'].replace("Strona:", "").replace("/", "-") image.save(f"{args.output_folder}/{title}.png") - if round(sum(os.path.getsize(f"./images/{file}") for file in os.listdir("./images")) * 0.000001, 2) > args.max_folder_size_mb: + if round(sum(os.path.getsize(f"./{args.output_folder}/{file}") for file in os.listdir(f"./{args.output_folder}")) * 0.000001, 2) > args.max_folder_size_mb: print(f"Limit size of: {args.max_folder_size_mb}, exceeded") save_state(n, offset) break