From a43882456d0a449d9809ffd6226a4076929904dd Mon Sep 17 00:00:00 2001 From: Ovear Date: Mon, 9 Jan 2023 03:44:16 +0800 Subject: [PATCH] Add log when get content length for url failed. --- Modules/download.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/download.py b/Modules/download.py index c2138af..288ae08 100644 --- a/Modules/download.py +++ b/Modules/download.py @@ -176,7 +176,8 @@ def get_content_length(url): return 0 content_length = r.headers.get("Content-Length", 0) return int(content_length) - except Exception: + except Exception as e: + print(f'{config.ERROR_COLOR}Can not get content length for {url}...{config.END}') pass return 0