fix tabs
This commit is contained in:
parent
fcbe2db038
commit
5d6cb78cdf
6
crawl.js
6
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})`);
|
||||
|
||||
|
|
Loading…
Reference in a new issue