From f3bb9a85409f9135b332c818723b788f872d38b7 Mon Sep 17 00:00:00 2001 From: Akash <64683866+akamhy@users.noreply.github.com> Date: Mon, 20 Jul 2020 10:11:36 +0530 Subject: [PATCH] Update wrapper.py --- waybackpy/wrapper.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/waybackpy/wrapper.py b/waybackpy/wrapper.py index 3573e7c..6c80687 100644 --- a/waybackpy/wrapper.py +++ b/waybackpy/wrapper.py @@ -64,14 +64,7 @@ class Url(): request_url = ("https://web.archive.org/save/" + self.clean_url()) hdr = { 'User-Agent' : '%s' % self.user_agent } #nosec req = Request(request_url, headers=hdr) #nosec - try: - response = urlopen(req) #nosec - except Exception: - try: - response = urlopen(req) #nosec - except Exception as e: - raise WaybackError(e) - header = response.headers + header = self.get_response(req).headers def archive_url_parser(header): """Parse out the archive from header."""