Update index.mjs
This commit is contained in:
parent
93141df1d3
commit
fe59ffa0a3
1 changed files with 10 additions and 9 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue