Merge pull request #67 from dbanon87/dbanon87/erome-downloads

fix erome download URLs
This commit is contained in:
Ali Parlakçı
2019-10-17 09:51:02 +03:00
committed by GitHub

View File

@@ -117,7 +117,9 @@ class Erome:
post["postSubmitter"]+"_"+title+"_"+post['postId']+".tmp" 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: try:
getFile(fileDir,tempDir,imageURL) getFile(fileDir,tempDir,imageURL)
@@ -146,7 +148,9 @@ class Erome:
extension = getExtension(IMAGES[i]) extension = getExtension(IMAGES[i])
fileName = str(i+1) 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) fileDir = folderDir / (fileName + extension)
tempDir = folderDir / (fileName + ".tmp") tempDir = folderDir / (fileName + ".tmp")