From 872951fa444685a645625d0356659beb229af163 Mon Sep 17 00:00:00 2001 From: Radiquum Date: Sun, 19 Jun 2022 15:46:38 +0500 Subject: [PATCH] fix folder naming when downloading submisions --- furaffinity-dl.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/furaffinity-dl.py b/furaffinity-dl.py index 133922f..edf5695 100644 --- a/furaffinity-dl.py +++ b/furaffinity-dl.py @@ -206,10 +206,6 @@ def download(path): image = s.find(class_="download").find("a").attrs.get("href") title = s.find(class_="submission-title").find("p").contents[0] + " " description = s.find(class_="submission-description").text.strip().replace("\r\n", "\n") - author = s.find(class_="submission-id-sub-container") - if args.submissions is True: - global output - output = f"furaffinity-dl/gallery/{author}" if args.json_description is True: description = [] @@ -217,7 +213,7 @@ def download(path): data = { "id": int(path.split("/")[-2:-1][0]), "filename": filename, - "author": author + "author": s.find(class_="submission-id-sub-container") .find("a") .find("strong") .text, @@ -235,6 +231,10 @@ def download(path): "rating": s.find(class_="rating-box").text.strip(), "comments": [], } + + if args.submissions is True: + global output + output = f"furaffinity-dl/gallery/{data.get('author')}" if args.filter is True: match = re.search(