From d5fb9a5219a9f81de46ab8ce6c6fab34e62d1798 Mon Sep 17 00:00:00 2001 From: akamhy <64683866+akamhy@users.noreply.github.com> Date: Mon, 4 May 2020 08:34:08 +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 4a05d96..850cf32 100644 --- a/waybackpy/wrapper.py +++ b/waybackpy/wrapper.py @@ -62,7 +62,7 @@ def near( UA=default_UA, ): timestamp = str(year)+str(month)+str(day)+str(hour)+str(minute) - request_url = "https://archive.org/wayback/available?url=%s×tamp=%s" % (str(url), str(timestamp)) + request_url = "https://archive.org/wayback/available?url=%s×tamp=%s" % (str(url).strip(), str(timestamp)) hdr = { 'User-Agent' : '%s' % UA } req = Request(request_url, headers=hdr) response = urlopen(req) #nosec