@j3lte/mementoweb
v0.3.0
Published
A client for the Memento Protocol.
Readme
@j3lte/mementoweb
A client for the Memento Protocol.
✨ Features
- Create clients for the archive and wayback domains. (e.g. archive.today and web.archive.org)
- Check the archives for the given URL
🚀 Installation
Deno (Recommended)
deno add @j3lte/mementowebNPM
npm install @j3lte/mementoweb📦 Documentation
📖 Usage
import { checkArchives, createArchiveClient } from "@j3lte/mementoweb";
// Check the archives for the given URL
const result = await checkArchives("https://www.thisnewswebsite.com/newsitem/article/234585");
console.log(result);
// Create a client for Archive.today
const archiveClient = createArchiveClient();
const archiveTimeMap = await archiveClient.getTimeMap("https://www.thisnewswebsite.com/newsitem/article/234585");
console.log(archiveTimeMap);⚠️ Notes
1.) Somehow
checkArchivesis very slow
When using checkArchives, this is best used on a specific webpage, NOT a domain. If you do this for a domain (like https://google.com), it tries to fetch all archive urls from both, which can take a while.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
