Detect HTTPS links in content_type()

This allows downloading files provided via https links.
main
Gustavo Sousa 4 years ago
parent 60b424a745
commit 0eeec091bf

@ -114,7 +114,7 @@ def write_file(filepath, data, mode='w'):
def content_type(path): def content_type(path):
parsed = urlparse(path) parsed = urlparse(path)
if parsed.scheme == 'http': if parsed.scheme in ('http', 'https'):
return 'url' return 'url'
else: else:
return 'file' return 'file'

Loading…
Cancel
Save