Update wrapper.py

This commit is contained in:
Akash 2020-07-20 10:11:36 +05:30 committed by GitHub
parent bb94e0d1c5
commit f3bb9a8540
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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."""