Logged olx price scraping.
This commit is contained in:
@@ -240,13 +240,18 @@ class OlxCrawler {
|
|||||||
let price = null;
|
let price = null;
|
||||||
let normalPrice = null;
|
let normalPrice = null;
|
||||||
let urgentPrice = null;
|
let urgentPrice = null;
|
||||||
const normalPriceValue = $("#pc > p:nth-child(2)").text();
|
const normalPriceValue = $("#pc > p:nth-child(2)")
|
||||||
|
.text()
|
||||||
|
.trim();
|
||||||
const urgentPriceValue = $(
|
const urgentPriceValue = $(
|
||||||
"#artikal_glavni_div > div.artikal_lijevo > div:nth-child(5) > p"
|
"#artikal_glavni_div > div.artikal_lijevo > div:nth-child(5) > p"
|
||||||
)
|
)
|
||||||
.text()
|
.text()
|
||||||
.trim();
|
.trim();
|
||||||
|
//
|
||||||
|
console.log("Normal price value:", normalPriceValue);
|
||||||
|
console.log("Urgent price value:", urgentPriceValue);
|
||||||
|
//
|
||||||
if (normalPriceValue && normalPriceValue.length > 0) {
|
if (normalPriceValue && normalPriceValue.length > 0) {
|
||||||
normalPrice = normalPriceValue
|
normalPrice = normalPriceValue
|
||||||
.replace(/\r\n|\n|\r/gm, "")
|
.replace(/\r\n|\n|\r/gm, "")
|
||||||
|
|||||||
Reference in New Issue
Block a user