mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
upgrade dependencies | fixing tests
This commit is contained in:
@@ -4,7 +4,7 @@ const utils = require('../utils');
|
||||
|
||||
function normalize(o) {
|
||||
const id = parseInt(o.id.substring(o.id.indexOf('_') + 1, o.id.length));
|
||||
const size = o.size.replace('Wohnfläche ', '');
|
||||
const size = o.size != null ? o.size.replace('Wohnfläche ', '') : 'N/A m²';
|
||||
const price = o.price.replace('Kaufpreis ', '');
|
||||
const address = o.address.split(' • ')[1];
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@ const Fredy = require('../fredy');
|
||||
const utils = require('../utils');
|
||||
|
||||
function normalize(o) {
|
||||
const title = o.title + '| '+o.subTitle;
|
||||
return Object.assign(o, { title });
|
||||
return o;
|
||||
}
|
||||
|
||||
function applyBlacklist(o) {
|
||||
@@ -20,8 +19,7 @@ const neubauKompass = {
|
||||
id: '@id',
|
||||
title: 'a@title | removeNewline | trim',
|
||||
link: 'a@href',
|
||||
subTitle: '.p-3 .mb-2 | removeNewline | trim',
|
||||
address: 'div.p-3 > p:nth-child(3) | removeNewline | trim'
|
||||
address: 'div.p-2 > p:nth-child(3) | removeNewline | trim'
|
||||
},
|
||||
paginate: '.numbered-pager__bottom .numbered-pager--info li:nth-child(2) a@href',
|
||||
normalize: normalize,
|
||||
|
||||
Reference in New Issue
Block a user