From 0eeec091bf4ed7821fecf3b27efbc3ba8eb9ca45 Mon Sep 17 00:00:00 2001 From: Gustavo Sousa Date: Thu, 21 Jan 2021 12:59:29 -0300 Subject: [PATCH] Detect HTTPS links in content_type() This allows downloading files provided via https links. --- pubs/content.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubs/content.py b/pubs/content.py index b1e403b..e06b72e 100644 --- a/pubs/content.py +++ b/pubs/content.py @@ -114,7 +114,7 @@ def write_file(filepath, data, mode='w'): def content_type(path): parsed = urlparse(path) - if parsed.scheme == 'http': + if parsed.scheme in ('http', 'https'): return 'url' else: return 'file'