Update wrapper.py
This commit is contained in:
parent
705f4164e2
commit
69f265ccff
@ -41,6 +41,7 @@ def near(
|
|||||||
day=datetime.utcnow().strftime('%d'),
|
day=datetime.utcnow().strftime('%d'),
|
||||||
hour=datetime.utcnow().strftime('%H'),
|
hour=datetime.utcnow().strftime('%H'),
|
||||||
minute=datetime.utcnow().strftime('%M'),
|
minute=datetime.utcnow().strftime('%M'),
|
||||||
|
UA="pywayback python module",
|
||||||
):
|
):
|
||||||
timestamp = str(year)+str(month)+str(day)+str(hour)+str(minute)
|
timestamp = str(year)+str(month)+str(day)+str(hour)+str(minute)
|
||||||
Rurl = "https://archive.org/wayback/available?url=%s×tamp=%s" % (str(url), str(timestamp))
|
Rurl = "https://archive.org/wayback/available?url=%s×tamp=%s" % (str(url), str(timestamp))
|
||||||
@ -51,8 +52,8 @@ def near(
|
|||||||
archive_url = (data["archived_snapshots"]["closest"]["url"])
|
archive_url = (data["archived_snapshots"]["closest"]["url"])
|
||||||
return archive_url
|
return archive_url
|
||||||
|
|
||||||
def oldest(url):
|
def oldest(url,UA="pywayback python module"):
|
||||||
return near(url,1995)
|
return near(url,year=1995,UA=UA)
|
||||||
|
|
||||||
def newest(url):
|
def newest(url,UA="pywayback python module"):
|
||||||
return near(url)
|
return near(url,UA=UA)
|
||||||
|
Loading…
Reference in New Issue
Block a user