Reduced pager to 5 pages at a time
This commit is contained in:
@@ -134,7 +134,7 @@ class Indexer {
|
||||
} else {
|
||||
console.log("HAS MORE RESULTS, should only contain HREFS");
|
||||
console.log(results.length);
|
||||
const newResults = await this.indexWithPagination(results[0].pageNumber + 10);
|
||||
const newResults = await this.indexWithPagination(results[0].pageNumber + 5);
|
||||
const singlePageIndexers = this.prepareHrefIndexers(results);
|
||||
|
||||
const newerResults = await Promise.map(singlePageIndexers, function (indexer) {
|
||||
@@ -161,7 +161,7 @@ class Indexer {
|
||||
const indexers = [];
|
||||
let lastPageNumber;
|
||||
if (pageNr) {
|
||||
for (let index = Number(pageNr[0]); index <= Number(pageNr[0]) + 10; index++) {
|
||||
for (let index = Number(pageNr[0]); index <= Number(pageNr[0]) + 5; index++) {
|
||||
lastPageNumber = index;
|
||||
const newOlxUrl = {
|
||||
url: this.olxUrl.url.replace(/\d+$/, "") + index,
|
||||
@@ -172,7 +172,7 @@ class Indexer {
|
||||
|
||||
}
|
||||
} else {
|
||||
for (let index = 1; index <= 10; index++) {
|
||||
for (let index = 1; index <= 5; index++) {
|
||||
lastPageNumber = index;
|
||||
const newOlxUrl = {
|
||||
url: this.olxUrl.url + index,
|
||||
|
||||
Reference in New Issue
Block a user