This commit is contained in:
Akash 2020-07-19 23:02:04 +05:30 committed by GitHub
parent e87dee3bdf
commit 83c962166d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,7 @@ class Url():
try: try:
response = urlopen(req) #nosec response = urlopen(req) #nosec
except Exception as e: except Exception as e:
WaybackError(e) raise WaybackError(e)
data = json.loads(response.read().decode("UTF-8")) data = json.loads(response.read().decode("UTF-8"))
if not data["archived_snapshots"]: if not data["archived_snapshots"]:
@ -161,6 +161,6 @@ class Url():
try: try:
response = urlopen(req) #nosec response = urlopen(req) #nosec
except Exception as e: except Exception as e:
WaybackError(e) raise WaybackError(e)
return str(response.read()).count(",") # Most efficient method to count number of archives (yet) return str(response.read()).count(",") # Most efficient method to count number of archives (yet)