diff --git a/url_image_preview/http_functions.py b/url_image_preview/http_functions.py index bd708b4..19fbf42 100644 --- a/url_image_preview/http_functions.py +++ b/url_image_preview/http_functions.py @@ -67,7 +67,7 @@ def _get_http_head_direct(url): clen = f.headers['Content-Length'] try: clen = int(clen) - except ValueError: + except (TypeError, ValueError): pass return (ctype, clen)