Update wrapper.py

This commit is contained in:
akamhy 2020-05-04 08:34:08 +05:30 committed by GitHub
parent 52b4bb9ac7
commit d5fb9a5219
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ def near(
UA=default_UA, UA=default_UA,
): ):
timestamp = str(year)+str(month)+str(day)+str(hour)+str(minute) timestamp = str(year)+str(month)+str(day)+str(hour)+str(minute)
request_url = "https://archive.org/wayback/available?url=%s&timestamp=%s" % (str(url), str(timestamp)) request_url = "https://archive.org/wayback/available?url=%s&timestamp=%s" % (str(url).strip(), str(timestamp))
hdr = { 'User-Agent' : '%s' % UA } hdr = { 'User-Agent' : '%s' % UA }
req = Request(request_url, headers=hdr) req = Request(request_url, headers=hdr)
response = urlopen(req) #nosec response = urlopen(req) #nosec