edgi-govdata-archiving / wayback

A Python API to the Internet Archive Wayback Machine
https://wayback.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
61 stars 12 forks source link

Ensure memento's links match memento's mode #113

Closed Mr0grog closed 1 year ago

Mr0grog commented 1 year ago

The links attribute on a Memento object links to other related resources, such as the first/previous/next/last memento of the current memento's URL. These are super useful for iterating and navigating through mementos, BUT the archive.org servers always return these as links to the memento in "view" mode. Users of this library rarely use "view" mode, and if you are iterating through links in a different mode, simply following one of the links can lead to subtle mistakes! To mitigate this, we now change all the links that reference mementos to use the same mode as the Memento object they are attached to.

Fixes #111.

Mr0grog commented 1 year ago

I wound up buried in some other work issues last week, circling back around to this now. Planning to release v0.4.1 later this evening.