Fix logic for is_url

This is not perfect

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
This commit is contained in:
lzzy12 2019-09-26 05:53:51 +05:30
parent 6c082f7e77
commit 50020b0e6b

View File

@ -11,10 +11,9 @@ class DownloadHelper:
self.__is_torrent = False
def is_url(self, url: str):
try:
urlparse(url)
# TODO: Find the proper way to validate the url
if url.startswith('https://') or url.startswith('http://'):
return True
except ValueError:
return False
def is_magnet(self, url: str):