After scraper fix #104

Merged
RabbIT09-n merged 4 commits from after-scraper-fix into master 2020-02-28 17:14:44 +01:00
2 changed files with 15 additions and 10 deletions
Showing only changes of commit df5e38092d - Show all commits

View File

@@ -248,11 +248,12 @@ class OlxCrawler {
)
.text()
.trim();
//
console.log("Title:", title);
console.log("Url scraped:", url);
console.log("Normal price value:", normalPriceValue);
console.log("Urgent price value:", urgentPriceValue);
//Debug
//console.log("Title:", title);
//console.log("Url scraped:", url);
// console.log("Normal price value:", normalPriceValue);
// console.log("Urgent price value:", urgentPriceValue);
//
if (normalPriceValue && normalPriceValue.length > 0) {
normalPrice = normalPriceValue
@@ -668,7 +669,7 @@ class OlxCrawler {
numberOfViewsAgency
};
//
console.log("Scraped data:", data);
//console.log("Scraped data:", data);
return data;
} catch (e) {

View File

@@ -274,10 +274,14 @@ class SaljicCrawler {
.trim();
const latAndLongSrc = $(propertySelectors.latAndLong).attr("src");
const tmpLatLong = latAndLongSrc.split("marker=")[1];
const latText = tmpLatLong.split("%2C")[0];
const longText = tmpLatLong.split("%2C")[1];
let tmpLatLong;
let latText;
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 locationLong = parseFloat(longText) || null;