From 705f4164e200ec889838c3efc0c897e5cfc9cb2a Mon Sep 17 00:00:00 2001 From: akamhy <64683866+akamhy@users.noreply.github.com> Date: Sat, 2 May 2020 15:31:33 +0530 Subject: [PATCH] Update wrapper.py --- pywayback/wrapper.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pywayback/wrapper.py b/pywayback/wrapper.py index a3793a2..9534618 100644 --- a/pywayback/wrapper.py +++ b/pywayback/wrapper.py @@ -24,15 +24,13 @@ def save(url,UA="pywayback python module"): hdr = { 'User-Agent' : '%s' % UA } req = Request(request_url, headers=hdr) try: - response = urlopen(req) + response = urlopen(req) #nosec except urllib.error.HTTPError as e: raise TooManyArchivingRequestsError(e) - # print(response.read()) header = response.headers if "exclusion.robots.policy" in str(header): raise ArchivingNotAllowed("Can not archive %s. Disabled by site owner." % (url)) archive_id = header['Content-Location'] - print(header) archived_url = "https://web.archive.org" + archive_id return archived_url