fixing neubaukompass && updating dependencies

This commit is contained in:
Christian Kellner
2019-10-24 21:25:19 +02:00
parent 8e225f761c
commit 9106144d9c
8 changed files with 341 additions and 529 deletions

View File

@@ -3,27 +3,27 @@ const Fredy = require('../fredy');
const utils = require('../utils');
function normalize(o) {
return o;
return o;
}
function applyBlacklist(o) {
return !utils.isOneOf(o.title, config.blacklist);
return !utils.isOneOf(o.title, config.blacklist);
}
const neubauKompass = {
name: 'neubauKompass',
enabled: config.sources.neubauKompass.enabled,
url: config.sources.neubauKompass.url,
crawlContainer: '.row article',
crawlFields: {
id: '@id',
title: 'a@title | removeNewline | trim',
link: 'a@href',
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,
filter: applyBlacklist
name: 'neubauKompass',
enabled: config.sources.neubauKompass.enabled,
url: config.sources.neubauKompass.url,
crawlContainer: '.row article',
crawlFields: {
id: '@id',
title: 'div.p-2 > a@title | removeNewline | trim',
link: 'div.p-2 > a@href',
address: 'div.p-2 > p | removeNewline | trim'
},
paginate: '.numbered-pager__bottom .numbered-pager--info li:nth-child(2) a@href',
normalize: normalize,
filter: applyBlacklist
};
module.exports = new Fredy(neubauKompass);