From 34cc663d64baa967c21680afb009fcfa85e7efea Mon Sep 17 00:00:00 2001 From: Jonathan Lin Date: Mon, 28 Mar 2022 13:00:07 -0400 Subject: [PATCH] minor change in header syntaxq get_header --- dino_engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dino_engine.py b/dino_engine.py index 6fc197e..599273d 100755 --- a/dino_engine.py +++ b/dino_engine.py @@ -31,7 +31,7 @@ def downloader(url, file_path): if hasattr(meta.headers, 'getheaders'): file_size = int(meta.getheaders("Content-Length")[0]) else: - file_size = int(meta.headers.get("Content-Length")[0]) + file_size = int(meta.get_header("Content-Length")[0]) print("%s is %s bytes." % (file_path, file_size)) with open(file_path, 'wb') as code: chunk_size = 8192