Update wrapper.py
This commit is contained in:
@@ -102,6 +102,7 @@ class Url():
|
|||||||
return response.read().decode(encoding.replace("text/html", "UTF-8", 1))
|
return response.read().decode(encoding.replace("text/html", "UTF-8", 1))
|
||||||
|
|
||||||
def get_response(self, req):
|
def get_response(self, req):
|
||||||
|
"""Get response for the supplied request."""
|
||||||
try:
|
try:
|
||||||
response = urlopen(req) #nosec
|
response = urlopen(req) #nosec
|
||||||
except Exception:
|
except Exception:
|
||||||
@@ -110,7 +111,6 @@ class Url():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise WaybackError(e)
|
raise WaybackError(e)
|
||||||
|
|
||||||
|
|
||||||
def near(self, **kwargs):
|
def near(self, **kwargs):
|
||||||
""" Returns the archived from Wayback Machine for an URL closest to the time supplied.
|
""" Returns the archived from Wayback Machine for an URL closest to the time supplied.
|
||||||
Supported params are year, month, day, hour and minute.
|
Supported params are year, month, day, hour and minute.
|
||||||
|
Reference in New Issue
Block a user