adding comma separation for MailJet & Sendgrid | fixing immowelt | upgrading dependencies (#34)

This commit is contained in:
Christian Kellner
2021-10-06 10:45:13 +02:00
committed by GitHub
parent 8d93581dfc
commit ec986e4b18
10 changed files with 827 additions and 536 deletions

View File

@@ -3,10 +3,7 @@ const utils = require('../utils');
let appliedBlackList = [];
function normalize(o) {
const size = o.size == null ? '--- m²' : o.size.split('Wohnfläche')[1].replace(' (ca.) ', '');
const address = o.address;
return Object.assign(o, { size, address });
return o;
}
function applyBlacklist(o) {
@@ -18,14 +15,14 @@ function applyBlacklist(o) {
const config = {
url: null,
crawlContainer: '.immoliste .js-object.listitem_wrap ',
crawlContainer: "div[class^='EstateItem-']",
crawlFields: {
id: '@data-estateid | int',
price: '.hardfacts_3 strong | removeNewline | trim',
size: '.js-object.listitem_wrap .hardfacts_3 div:nth-child(2)| removeNewline | trim',
title: '.listcontent.clear h2',
id: 'a@id',
price: "div[class^='KeyFacts-'] [data-test='price'] | removeNewline | trim",
size: "div[class^='KeyFacts-'] [data-test='area'] | removeNewline | trim",
title: "div[class^='FactsMain-'] h2",
link: 'a@href',
address: '.listcontent .details .listlocation| removeNewline | trim',
address: "div[class^='estateFacts-'] span | removeNewline | trim",
},
paginate: '#pnlPaging #nlbPlus@href',
normalize: normalize,