From 854eac8c49df51f54ef732491ee51ce801f459d4 Mon Sep 17 00:00:00 2001 From: Ronald Farrer Date: Wed, 4 Sep 2024 14:16:11 -0700 Subject: [PATCH] Update sgspider.py Handle image URLs that contain extra characters in filename after file extension. --- sgspider.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sgspider.py b/sgspider.py index beb12d8..4b3bf56 100755 --- a/sgspider.py +++ b/sgspider.py @@ -121,6 +121,7 @@ def dlimgs(girl, album, url): os.makedirs(path, exist_ok=True) filename = os.path.join(path, re.sub('(.*)/', "", os.path.join(path, url))) filename = filename.strip() + filename = filename.split("?")[0] print("Looking at: " + str(url)) if os.path.exists(filename.strip()) == True: print("File: " + str(filename) + " already downloaded, skipping!")