1

Amélioration de la détection de liens externes morts

This commit is contained in:
2025-10-31 12:41:34 +01:00
parent 7442622c74
commit f8b824c540
7 changed files with 885 additions and 3474 deletions

View File

@@ -0,0 +1,21 @@
const { getArchiveUrl, saveToArchive } = require("../lib/archive");
(async () => {
const testUrl = "https://richard-dern.fr";
console.log(`🔍 Checking Archive.org for: ${testUrl}`);
let archiveUrl = await getArchiveUrl(testUrl);
if (archiveUrl) {
console.log(`✔ Archive found: ${archiveUrl}`);
} else {
console.log(`❌ No archive found, requesting a new one...`);
archiveUrl = await saveToArchive(testUrl);
if (archiveUrl) {
console.log(`✔ URL successfully archived: ${archiveUrl}`);
} else {
console.log(`❌ Failed to archive the URL.`);
}
}
})();