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