feat: improve output filenames

This commit is contained in:
missytake 2025-11-24 21:58:35 +01:00
parent 5b342f4667
commit 79a10f9c41
Signed by: missytake
GPG key ID: 04CC6658320518DF

View file

@ -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,
)