Fixed direct uploads bug

This commit is contained in:
Ali
2020-07-08 22:23:55 +03:00
parent 14607eeecf
commit da0113a06f

View File

@@ -342,7 +342,7 @@ def extractDirectLink(URL):
if not, return False if not, return False
""" """
imageTypes = ['.jpg','.png','.mp4','.webm','.gif'] imageTypes = ['jpg','png','mp4','webm','gif']
if URL[-1] == "/": if URL[-1] == "/":
URL = URL[:-1] URL = URL[:-1]
@@ -350,7 +350,7 @@ def extractDirectLink(URL):
return URL return URL
for extension in imageTypes: for extension in imageTypes:
if extension in URL.split(".")[-1]: if extension == URL.split(".")[-1]:
return URL return URL
else: else:
return None return None