improve OLX ad status detection

This commit is contained in:
Bilal Catic
2019-11-14 08:04:58 +01:00
parent 168b2186e7
commit a7cd75653d

View File

@@ -547,6 +547,9 @@ class OlxCrawler {
case "bazen":
pool = true;
break;
case "iznajmljeno":
status = AD_STATUS.STATUS_RENTED;
break;
default:
// console.log(fieldTitle, " = ", fieldValue);
break;
@@ -573,6 +576,10 @@ class OlxCrawler {
locationLong = parseFloat(locationLatLngMatches[2]) || null;
}
if (title.indexOf("[PRODANO]") !== -1) {
status = AD_STATUS.STATUS_SOLD;
}
const data = {
url,
agencyObjectId: olxId,