From bd532c6c6601808944b69ddc941a1a33f2a94e3b Mon Sep 17 00:00:00 2001 From: Kevin F Date: Sun, 3 Oct 2021 23:09:58 +0000 Subject: [PATCH] append jpg if there isnt one for single image --- imgin/get.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/imgin/get.py b/imgin/get.py index 8deaccd..738ad44 100644 --- a/imgin/get.py +++ b/imgin/get.py @@ -34,6 +34,10 @@ def get(url: str, write_dir: str, delete=True): album = True if not url.endswith("blog"): url += "/layout/blog" + else: + if url.endswith("jpeg") and not url.endswith("jpg") and not url.endswith("png"): + url += ".jpg" + if not album: print('Getting img', url)