Update wrapper.py
This commit is contained in:
parent
bb94e0d1c5
commit
f3bb9a8540
@ -64,14 +64,7 @@ class Url():
|
|||||||
request_url = ("https://web.archive.org/save/" + self.clean_url())
|
request_url = ("https://web.archive.org/save/" + self.clean_url())
|
||||||
hdr = { 'User-Agent' : '%s' % self.user_agent } #nosec
|
hdr = { 'User-Agent' : '%s' % self.user_agent } #nosec
|
||||||
req = Request(request_url, headers=hdr) #nosec
|
req = Request(request_url, headers=hdr) #nosec
|
||||||
try:
|
header = self.get_response(req).headers
|
||||||
response = urlopen(req) #nosec
|
|
||||||
except Exception:
|
|
||||||
try:
|
|
||||||
response = urlopen(req) #nosec
|
|
||||||
except Exception as e:
|
|
||||||
raise WaybackError(e)
|
|
||||||
header = response.headers
|
|
||||||
|
|
||||||
def archive_url_parser(header):
|
def archive_url_parser(header):
|
||||||
"""Parse out the archive from header."""
|
"""Parse out the archive from header."""
|
||||||
|
Loading…
Reference in New Issue
Block a user