You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you request a memento URL with a SURT form that is equivalent to the memento’s actual URL, the url property of the resulting memento object is incorrect — it reflects the URL you requested, rather than the actual, captured URL.
For example:
fromwaybackimportWaybackClientc=WaybackClient()
memento=c.get_memento('http://robbrackett.com/', datetime='20220315020402')
memento.url# 'http://robbrackett.com/'# But the actual capture was from:# 'https://robbrackett.com/'# The `link` header has the right info:memento._raw_headers['link']
# '<https://robbrackett.com/>; rel="original", ...'
The right details are in the link header, and we should be parsing that. We’ve had a feature request to do that for a while (#57), but I hadn’t realized that there was a bug like this that we have to do it to properly work around.
The text was updated successfully, but these errors were encountered:
When getting a memento, parse the `Link` header to get the URL the Memento is a capture of, rather than parsing the Memento's URL, which isn't necessarily accurate. Fixes#99.
This fixes an issue where the `Memento.url` property could be slightly incorrect, since it was based on the URL you requested the memento from (e.g. `https://web.archive.org/web/20221010000000/<url>`), rather than the actual URL the memento was captured from. The URL the memento is requested from matches records via SURT key rather than the URL.
For example, requesting an archived copy of `http://fws.gov/` might return a capture of `https://www.fws.gov/` instead. The returned Memento object’s `url` property used to be `http://fws.gov/` in this case, but this changes it to be `https://www.fws.gov/`.
Since this required checking the `links` header, I also went ahead and made the parsed `links` data available on `Memento`.
Fixes#57.
Fixes#99.
If you request a memento URL with a SURT form that is equivalent to the memento’s actual URL, the
url
property of the resulting memento object is incorrect — it reflects the URL you requested, rather than the actual, captured URL.For example:
The right details are in the
link
header, and we should be parsing that. We’ve had a feature request to do that for a while (#57), but I hadn’t realized that there was a bug like this that we have to do it to properly work around.The text was updated successfully, but these errors were encountered: