##// END OF EJS Templates
NoneDownloader should handle only protocols that are 100% not processed by a simple downloader
neko259 -
r1810:167a799f default
parent child Browse files
Show More
@@ -88,15 +88,7 b' class YouTubeDownloader(Downloader):'
88 88 class NothingDownloader(Downloader):
89 89 @staticmethod
90 90 def handles(url: str) -> bool:
91 if REGEX_MAGNET.match(url):
92 return True
93
94 response_head = requests.head(url, verify=False)
95 if response_head.status_code == HTTP_RESULT_OK:
96 content_type = response_head.headers[HEADER_CONTENT_TYPE].split(';')[0]
97 return content_type in TYPE_URL_ONLY
98 else:
99 return False
91 return REGEX_MAGNET.match(url)
100 92
101 93 @staticmethod
102 94 def download(url: str):
General Comments 0
You need to be logged in to leave comments. Login now