From 79a10f9c41de998979aa7aff06cab54995c40a65 Mon Sep 17 00:00:00 2001 From: missytake Date: Mon, 24 Nov 2025 21:58:35 +0100 Subject: [PATCH] feat: improve output filenames --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index fd798af..00208af 100644 --- a/main.py +++ b/main.py @@ -36,7 +36,7 @@ def fetch_page( if not img_url.startswith("https://"): img_url = domain + img_url comic = requests.get(img_url) - filename = out_dir.joinpath(f"{i}.{img_url.split('.')[-1]}") + filename = out_dir / f"{i:05d}-{url.split('/')[-1]}.{img_url.split('.')[-1]}" print(filename) try: @@ -112,7 +112,7 @@ def cli(): ) parser.add_argument( "--end", - default=9999999999999, + default=99999, help="At which page to stop with downloading", type=int, )