Closed dequeued0 closed 3 years ago
Will add support for unix_timestamp.
wayback_url_obj.near(unix_timestamp=)
, can not use timestamp as a parameter name as we support other OS and don't want to confuse UNIX timestamp with wayback machine timestamp.
Awesome, thanks! My only comment is that I'm not sure I'd call the parameter unix_timestamp
. The datetime and time modules just call it "timestamp" or "time" in most places. Seconds since epoch (i.e., the 1970 epoch) is a fairly standard thing for Python and various other things outside of the realm of Unix.
Instead of having to convert timestamps into year, month, day, hour, and minutes and then pass all of those parameters separately like
wayback_url_obj.near(year=year, month=month, day=day, hour=hour, minute=minute)
, it would be great if it was possible to just pass in a Unix timestamp (either integer or floating point seconds since epoch liketime.time()
) and have that automatically rounded to the nearest minute and converted internally into the appropriate format.Then the call could just be like
wayback_url_obj.near(my_timestamp)
or if you prefer a named parameterwayback_url_obj.near(timestamp=my_timestamp)
.