After scraper fix #104

Merged
RabbIT09-n merged 4 commits from after-scraper-fix into master 2020-02-28 17:14:44 +01:00
Showing only changes of commit 747f56941a - Show all commits

View File

@@ -240,13 +240,18 @@ class OlxCrawler {
let price = null;
let normalPrice = null;
let urgentPrice = null;
const normalPriceValue = $("#pc > p:nth-child(2)").text();
const normalPriceValue = $("#pc > p:nth-child(2)")
.text()
.trim();
const urgentPriceValue = $(
"#artikal_glavni_div > div.artikal_lijevo > div:nth-child(5) > p"
)
.text()
.trim();
//
console.log("Normal price value:", normalPriceValue);
console.log("Urgent price value:", urgentPriceValue);
//
if (normalPriceValue && normalPriceValue.length > 0) {
normalPrice = normalPriceValue
.replace(/\r\n|\n|\r/gm, "")