From 88fa9e742d1f6a1e88c2ed8debd84e0c05c3b1b8 Mon Sep 17 00:00:00 2001 From: dbanon87 <56310477+dbanon87@users.noreply.github.com> Date: Tue, 8 Oct 2019 10:51:56 -0400 Subject: [PATCH] fix erome download URLs --- src/downloader.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/downloader.py b/src/downloader.py index 53d98b9..a938808 100644 --- a/src/downloader.py +++ b/src/downloader.py @@ -117,7 +117,9 @@ class Erome: post["postSubmitter"]+"_"+title+"_"+post['postId']+".tmp" ) - imageURL = "https:" + IMAGES[0] + imageURL = IMAGES[0] + if 'https://' not in imageURL and 'http://' not in imageURL: + imageURL = "https://" + imageURL try: getFile(fileDir,tempDir,imageURL) @@ -146,7 +148,9 @@ class Erome: extension = getExtension(IMAGES[i]) fileName = str(i+1) - imageURL = "https:" + IMAGES[i] + imageURL = IMAGES[i] + if 'https://' not in imageURL and 'http://' not in imageURL: + imageURL = "https://" + imageURL fileDir = folderDir / (fileName + extension) tempDir = folderDir / (fileName + ".tmp")