Support datetime.timedelta
for target_window
in get_memento()
#55
Labels
Milestone
datetime.timedelta
for target_window
in get_memento()
#55
The
WaybackClient.get_memento()
method has atarget_window
parameter, which is used when a memento does not exist at the requested time. If the parameterexact=False
,get_memento()
returns the nearest-in-time memento, but only if it is within the number of seconds specified intarget_window
.wayback/wayback/_client.py
Lines 717 to 719 in c066e04
Since Python has a built in
datetime.timedelta
type to represent exactly this kind of concept, we should also accept it instead of an integer fortarget_window
. (Really, I’m not sure why we didn’t do this originally!)The text was updated successfully, but these errors were encountered: