Only log errors

This commit is contained in:
GotPPay
2017-11-22 12:37:51 +01:00
parent 9d9110bf63
commit 755973e42d
4 changed files with 12 additions and 14 deletions

View File

@@ -121,7 +121,7 @@ export default class OlxCrawler {
async indexPage(pageNr, maxResults = 1000) {
try {
console.log('Starting to index page: ' + pageNr);
//console.log('Starting to index page: ' + pageNr);
const url = `http://www.olx.ba/pretraga?vrsta=samoprodaja&sort_order=desc&kategorija=23&sort_po=datum&kanton=9&stranica=${pageNr}`;
const res = await fetch(url);
@@ -138,7 +138,7 @@ export default class OlxCrawler {
let actualNoOfResults = (hrefs.length <= maxResults) ? hrefs.length : maxResults;
for (let i = 0; i < hrefs.length; i++) {
console.log(`indexing: ${hrefs[i]}`);
//console.log(`indexing: ${hrefs[i]}`);
const singleData = await this.indexSingle(hrefs[i]);