From e8ff4ed14432fd4c6e4d4069819ff0533a16b804 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sun, 10 Nov 2024 23:15:16 +1100 Subject: [PATCH] fix parsing certain imgur album links --- common/common/media.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/common/media.py b/common/common/media.py index 5b7c898..485df52 100644 --- a/common/common/media.py +++ b/common/common/media.py @@ -317,6 +317,8 @@ def download_imgur_url(output_dir, max_size, url): download_imgur_image(output_dir, max_size, url, id, ext) return True elif parsed.path.startswith("/a/"): + # paths look like /a/some-name-then-ID + id = parsed.path.removeprefix("/a/").split("-")[-1] contents = download_imgur_album(url, parsed.path.removeprefix("/a/")) elif parsed.path.startswith("/gallery/"): contents = download_imgur_gallery(url, parsed.path.removeprefix("/gallery/"))