From a7cd75653d7e9c83b7719d29406b4e23003dd7b9 Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Thu, 14 Nov 2019 08:04:58 +0100 Subject: [PATCH] improve OLX ad status detection --- app/crawler/specificCrawlers/olx.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/crawler/specificCrawlers/olx.js b/app/crawler/specificCrawlers/olx.js index 952a8be..6ea9e8a 100644 --- a/app/crawler/specificCrawlers/olx.js +++ b/app/crawler/specificCrawlers/olx.js @@ -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,