Add caching to fetch wrapper
This commit is contained in:
@@ -159,7 +159,7 @@ class AktidoCrawler {
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await fetch(url);
|
||||
const res = await fetch(url, {}, false);
|
||||
const body = await res.text();
|
||||
const $ = cheerio.load(body);
|
||||
let hrefs = [];
|
||||
|
||||
@@ -217,7 +217,7 @@ class OlxCrawler {
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await fetch(url);
|
||||
const res = await fetch(url, {}, false);
|
||||
logDebug("Got category results for: ", url);
|
||||
const body = await res.text();
|
||||
logDebug("Got category results text for: ", url);
|
||||
|
||||
@@ -159,7 +159,7 @@ class RentalCrawler {
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await fetch(url);
|
||||
const res = await fetch(url, {} , false);
|
||||
const body = await res.text();
|
||||
const $ = cheerio.load(body);
|
||||
let hrefs = [];
|
||||
|
||||
@@ -160,7 +160,7 @@ class SaljicCrawler {
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await fetch(url);
|
||||
const res = await fetch(url, {}, false);
|
||||
const body = await res.text();
|
||||
const $ = cheerio.load(body);
|
||||
let hrefs = [];
|
||||
|
||||
Reference in New Issue
Block a user