mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
30 lines
800 B
JavaScript
Executable File
30 lines
800 B
JavaScript
Executable File
const config = require('../../conf/config.json');
|
|
const Fredy = require('../fredy');
|
|
const utils = require('../utils');
|
|
|
|
function normalize(o) {
|
|
return o;
|
|
}
|
|
|
|
function applyBlacklist(o) {
|
|
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
|
|
};
|
|
|
|
module.exports = new Fredy(neubauKompass);
|