fixing provider and their tests

This commit is contained in:
Christian Kellner
2020-02-16 13:09:15 +01:00
parent 9106144d9c
commit e676812688
8 changed files with 25 additions and 20 deletions

View File

@@ -3,7 +3,10 @@ const Fredy = require('../fredy');
const utils = require('../utils');
function normalize(o) {
const size = `${o.size.replace(' Wohnfläche ', '').trim()} / ${o.rooms.trim()}`;
let size = `${o.size.replace(' Wohnfläche ', '').trim()}`;
if(o.rooms != null){
size+=` / / ${o.rooms.trim()}`;
}
const link = `https://www.1a-immobilienmarkt.de/expose/${o.id}.html`;
return Object.assign(o, { size, link });