Update index.mjs

This commit is contained in:
The Ghost of FOSS' Future 2024-09-15 19:29:45 -05:00 committed by GitHub
parent 93141df1d3
commit fe59ffa0a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -117,6 +117,9 @@ function generateSearchTerm(hostname) {
const contexts = []; const contexts = [];
async function siteCrawler(hostname) { async function siteCrawler(hostname) {
try {
const crawled = generateSearchTerm(hostname); const crawled = generateSearchTerm(hostname);
const compiledConvert = compile({ wordwrap: 130 }); const compiledConvert = compile({ wordwrap: 130 });
@ -126,8 +129,6 @@ async function siteCrawler(hostname) {
maxDepth: 6, maxDepth: 6,
excludeDirs: ["https://search.sparksammy.com/", "https://search.sparksammy.com/search.php", "https://archive.org", "https://doubleclick.net", "https://paypal.com"], excludeDirs: ["https://search.sparksammy.com/", "https://search.sparksammy.com/search.php", "https://archive.org", "https://doubleclick.net", "https://paypal.com"],
}); });
try {
const webContents = await loader.load(); const webContents = await loader.load();
webContents.forEach(content => contexts.push(content)); webContents.forEach(content => contexts.push(content));
return webContents; return webContents;