Merge branch 'master' into changePostNames

This commit is contained in:
Ali Parlakçı
2018-07-24 19:33:38 +03:00
committed by GitHub
4 changed files with 52 additions and 14 deletions

View File

@@ -142,9 +142,16 @@ class Erome:
howManyDownloaded -= 1
except Exception as exception:
raise exception
# raise exception
print("\n Could not get the file")
print(" " + str(exception) + "\n")
print(
" "
+ "{class_name}: {info}".format(
class_name=exception.__class__.__name__,
info=str(exception)
)
+ "\n"
)
exceptionType = exception
howManyDownloaded -= 1
@@ -304,7 +311,14 @@ class Imgur:
except Exception as exception:
print("\n Could not get the file")
print(" " + str(exception) + "\n")
print(
" "
+ "{class_name}: {info}".format(
class_name=exception.__class__.__name__,
info=str(exception)
)
+ "\n"
)
exceptionType = exception
howManyDownloaded -= 1

View File

@@ -132,7 +132,7 @@ def nameCorrector(string):
if len(string.split('\n')) > 1:
string = "".join(string.split('\n'))
BAD_CHARS = ['\\','/',':','*','?','"','<','>','|','.',]
BAD_CHARS = ['\\','/',':','*','?','"','<','>','|','.','#']
if any(x in string for x in BAD_CHARS):
for char in string: