From 42ac399362dbbeb034bccff6d027101d8203db3e Mon Sep 17 00:00:00 2001 From: akamhy <64683866+akamhy@users.noreply.github.com> Date: Fri, 8 May 2020 09:47:13 +0530 Subject: [PATCH] Most efficient method to count (yet) --- waybackpy/wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waybackpy/wrapper.py b/waybackpy/wrapper.py index d61edca..c172100 100644 --- a/waybackpy/wrapper.py +++ b/waybackpy/wrapper.py @@ -140,4 +140,4 @@ def total_archives(url, UA=default_UA): except HTTPError as e: handle_HTTPError(e) - return (len(json.loads(response.read()))) + return str(response.read()).count(",") # Most efficient method to count (yet)