Back to richard-dern.fr
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
const { getArchiveUrl, saveToArchive } = require("./lib/archive");
|
||||
|
||||
(async () => {
|
||||
const testUrl = "https://richard.dern.ovh";
|
||||
|
||||
console.log(`🔍 Checking Archive.org for: ${testUrl}`);
|
||||
let archiveUrl = await getArchiveUrl(testUrl);
|
||||
|
||||
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(`✔ Archive found: ${archiveUrl}`);
|
||||
console.log(`✔ URL successfully archived: ${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.`);
|
||||
}
|
||||
console.log(`❌ Failed to archive the URL.`);
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -2,12 +2,12 @@ const { scrapePage } = require("./lib/puppeteer");
|
||||
const path = require("path");
|
||||
|
||||
(async () => {
|
||||
const testUrl = "https://richard.dern.ovh";
|
||||
const screenshotPath = path.join(__dirname, "test_screenshot.png");
|
||||
const testUrl = "https://richard-dern.fr";
|
||||
const screenshotPath = path.join(__dirname, "test_screenshot.png");
|
||||
|
||||
console.log(`🔍 Testing Puppeteer module on: ${testUrl}`);
|
||||
const metadata = await scrapePage(testUrl, screenshotPath);
|
||||
console.log(`🔍 Testing Puppeteer module on: ${testUrl}`);
|
||||
const metadata = await scrapePage(testUrl, screenshotPath);
|
||||
|
||||
console.log("📄 Page metadata:");
|
||||
console.log(metadata);
|
||||
console.log("📄 Page metadata:");
|
||||
console.log(metadata);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user