Decomment and saljic smal fix.
This commit is contained in:
@@ -248,11 +248,12 @@ class OlxCrawler {
|
|||||||
)
|
)
|
||||||
.text()
|
.text()
|
||||||
.trim();
|
.trim();
|
||||||
//
|
|
||||||
console.log("Title:", title);
|
//Debug
|
||||||
console.log("Url scraped:", url);
|
//console.log("Title:", title);
|
||||||
console.log("Normal price value:", normalPriceValue);
|
//console.log("Url scraped:", url);
|
||||||
console.log("Urgent price value:", urgentPriceValue);
|
// 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
|
||||||
@@ -668,7 +669,7 @@ class OlxCrawler {
|
|||||||
numberOfViewsAgency
|
numberOfViewsAgency
|
||||||
};
|
};
|
||||||
//
|
//
|
||||||
console.log("Scraped data:", data);
|
//console.log("Scraped data:", data);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -274,10 +274,14 @@ class SaljicCrawler {
|
|||||||
.trim();
|
.trim();
|
||||||
|
|
||||||
const latAndLongSrc = $(propertySelectors.latAndLong).attr("src");
|
const latAndLongSrc = $(propertySelectors.latAndLong).attr("src");
|
||||||
const tmpLatLong = latAndLongSrc.split("marker=")[1];
|
let tmpLatLong;
|
||||||
const latText = tmpLatLong.split("%2C")[0];
|
let latText;
|
||||||
const longText = tmpLatLong.split("%2C")[1];
|
let longText;
|
||||||
|
if (latAndLongSrc) {
|
||||||
|
tmpLatLong = latAndLongSrc.split("marker=")[1];
|
||||||
|
latText = tmpLatLong.split("%2C")[0];
|
||||||
|
longText = tmpLatLong.split("%2C")[1];
|
||||||
|
}
|
||||||
const locationLat = parseFloat(latText) || null;
|
const locationLat = parseFloat(latText) || null;
|
||||||
const locationLong = parseFloat(longText) || null;
|
const locationLong = parseFloat(longText) || null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user