Update index.mjs
This commit is contained in:
parent
017ab60428
commit
ac87207398
1 changed files with 1 additions and 3 deletions
|
@ -117,8 +117,6 @@ function generateSearchTerm(hostname) {
|
||||||
const contexts = [];
|
const contexts = [];
|
||||||
|
|
||||||
async function siteCrawler(hostname) {
|
async function siteCrawler(hostname) {
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const crawled = generateSearchTerm(hostname);
|
const crawled = generateSearchTerm(hostname);
|
||||||
|
|
||||||
|
@ -139,7 +137,7 @@ async function siteCrawler(hostname) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function contextAdd(hostnames) {
|
async function contextAdd(hostnames) {
|
||||||
const promises = hostnames.map(hostname => siteCrawler(hostname));
|
const promises = hostnames.map(hostname => siteCrawler(hostname) || "ERROR CRAWLING THIS SITE. IGNORE THIS DOCUMENT.");
|
||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
||||||
return contexts;
|
return contexts;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue