# HG changeset patch # User neko259 # Date 2016-10-21 05:26:24 # Node ID 0fb0af80af576c315233af5abe2ac75a7b84eaba # Parent 308a708f674b4cd95d56625da2e276341d1e67f3 Download youtube as videos, not always by links as html content 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,7 +88,7 @@ class NothingDownloader(Downloader): def handles(url: str) -> bool: response_head = requests.head(url, verify=False) content_type = response_head.headers[HEADER_CONTENT_TYPE].split(';')[0] - return content_type in TYPE_URL_ONLY + return content_type in TYPE_URL_ONLY and not YOUTUBE_URL.match(url) @staticmethod def download(url: str):