Changed delay between ads.
This commit is contained in:
@@ -217,6 +217,8 @@ class OlxCrawler {
|
||||
//let numberOfParseErrors = 0;
|
||||
// do {
|
||||
try {
|
||||
await this.sleep(this.delayBetweenAds);
|
||||
|
||||
const adPageSource = await fetch(url);
|
||||
const body = await adPageSource.text();
|
||||
const $ = cheerio.load(body);
|
||||
@@ -694,6 +696,8 @@ class OlxCrawler {
|
||||
console.error("Exception caught: " + e.message, "\r\nURL:", url);
|
||||
}
|
||||
// } while (hasParseErrors && numberOfParseErrors <= 1);
|
||||
await this.sleep(this.delayBetweenAds);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user