# HG changeset patch # User neko259 # Date 2017-01-07 22:00:44 # Node ID 167a799feebd6c4cd0501f8a173b8a4405fbb14a # Parent f75c0a41faf8bdd0e407c529c135c05fc51f9de3 NoneDownloader should handle only protocols that are 100% not processed by a simple downloader diff --git a/boards/models/attachment/downloaders.py b/boards/models/attachment/downloaders.py --- a/boards/models/attachment/downloaders.py +++ b/boards/models/attachment/downloaders.py @@ -88,15 +88,7 @@ class YouTubeDownloader(Downloader): class NothingDownloader(Downloader): @staticmethod def handles(url: str) -> bool: - if REGEX_MAGNET.match(url): - return True - - response_head = requests.head(url, verify=False) - if response_head.status_code == HTTP_RESULT_OK: - content_type = response_head.headers[HEADER_CONTENT_TYPE].split(';')[0] - return content_type in TYPE_URL_ONLY - else: - return False + return REGEX_MAGNET.match(url) @staticmethod def download(url: str):