From 8fd4462025338cb04a7e5ad2887c15b865246004 Mon Sep 17 00:00:00 2001 From: Akash <64683866+akamhy@users.noreply.github.com> Date: Mon, 20 Jul 2020 20:17:18 +0530 Subject: [PATCH] Update wrapper.py --- waybackpy/wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waybackpy/wrapper.py b/waybackpy/wrapper.py index 6c80687..d1c5a75 100644 --- a/waybackpy/wrapper.py +++ b/waybackpy/wrapper.py @@ -128,7 +128,7 @@ class Url(): response = self.get_response(req) data = json.loads(response.read().decode("UTF-8")) if not data["archived_snapshots"]: - raise WaybackError("'%s' is not yet archived." % url) + raise WaybackError("'%s' is not yet archived. Use wayback.Url(url, user_agent).save() to create a new archive." % self.clean_url()) archive_url = (data["archived_snapshots"]["closest"]["url"]) # wayback machine returns http sometimes, idk why? But they support https archive_url = archive_url.replace("http://web.archive.org/web/","https://web.archive.org/web/",1)