From 5d6cb78cdfc2e914bf87b0f400d930f5f17a87c3 Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 10 Mar 2024 11:07:24 +1300 Subject: [PATCH] fix tabs --- crawl.js | 6 +++--- zrch.js => srch.js | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename zrch.js => srch.js (100%) diff --git a/crawl.js b/crawl.js index b45970d..05f479e 100644 --- a/crawl.js +++ b/crawl.js @@ -23,10 +23,10 @@ async function crawl(url, ignoreExisting = false) { console.log(`[${res.status} ${res.statusText}] ${url}`); if(res.status == 200) { - const html = await res.text(); - const $ = cheerio.load(html); + const html = await res.text(); + const $ = cheerio.load(html); const title = $("title").text(); - const text = $.text().replace(/\s+/g, " ").trim(); + const text = $.text().replace(/\s+/g, " ").trim(); console.log(`[TITLE] ${title} (${url})`); diff --git a/zrch.js b/srch.js similarity index 100% rename from zrch.js rename to srch.js