Update sgspider.py
Handle image URLs that contain extra characters in filename after file extension.
This commit is contained in:
parent
1f63c9138e
commit
854eac8c49
1 changed files with 1 additions and 0 deletions
|
@ -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!")
|
||||
|
|
Loading…
Add table
Reference in a new issue