Published
Edited
Jul 30, 2022
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
https://archive.readme.io/
Insert cell
Insert cell
availability = {
const queryURL = new URL("https://archive.org/wayback/available");
queryURL.searchParams.set("url", url);
const res = await fetch(withCors(queryURL));
return res.json();
}
Insert cell
Insert cell
data = {
const res = await fetch(withCors(`https://web.archive.org/web/*/${url}`), {
method: "HEAD"
});
const headers = {};
for (const [name, value] of res.headers) {
headers[name] = value;
}
return headers;
}
Insert cell
Insert cell
_archiveURL = async () => {
const res = await fetch("https://pragma.archivelab.org/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ url })
});

return res.json();
}
Insert cell
Insert cell
archiveURL = async () => {
const res = await fetch(`https://web.archive.org/save/${url}`);
return res.json();
}
Insert cell
Insert cell
viewof archive = Inputs.button("Save Page Now", {
value: null,
reduce: archiveURL
})
Insert cell
Insert cell
cdx = {
const searchURL = new URL("http://web.archive.org/cdx/search/cdx");
searchURL.searchParams.set("url", url);
searchURL.searchParams.set("collapse", "digest");
searchURL.searchParams.set("output", "json");
const res = await fetch(withCors(searchURL));
return res.json();
}
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more