mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
fixing immonet and neubaukompass
This commit is contained in:
@@ -8,8 +8,10 @@ function normalize(o) {
|
|||||||
const price = o.price.replace('Kaufpreis ', '');
|
const price = o.price.replace('Kaufpreis ', '');
|
||||||
const address = o.address.split(' • ')[1];
|
const address = o.address.split(' • ')[1];
|
||||||
const title = o.title || 'No title available';
|
const title = o.title || 'No title available';
|
||||||
|
//normally we would just read the link from the source, but immonet decided to trick user by adding a click listener instead of
|
||||||
return Object.assign(o, { id, address, price, size, title });
|
//a href to do some weird reporting. (Very user friendly for handicaped ppl... not)
|
||||||
|
const link = `https://www.immonet.de/angebot/${id}`;
|
||||||
|
return Object.assign(o, { id, address, price, size, title, link });
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyBlacklist(o) {
|
function applyBlacklist(o) {
|
||||||
@@ -27,7 +29,6 @@ const config = {
|
|||||||
price: 'div[id*="selPrice_"] | trim',
|
price: 'div[id*="selPrice_"] | trim',
|
||||||
size: 'div[id*="selArea_"] | trim',
|
size: 'div[id*="selArea_"] | trim',
|
||||||
title: '.item a img@title',
|
title: '.item a img@title',
|
||||||
link: 'a[id*="lnkImgToDetails_"]@href',
|
|
||||||
address: '.item .box-25 .ellipsis .text-100 | removeNewline | trim',
|
address: '.item .box-25 .ellipsis .text-100 | removeNewline | trim',
|
||||||
},
|
},
|
||||||
paginate: '#idResultList .margin-bottom-6.margin-bottom-sm-12 .panel a.pull-right@href',
|
paginate: '#idResultList .margin-bottom-6.margin-bottom-sm-12 .panel a.pull-right@href',
|
||||||
|
|||||||
@@ -15,9 +15,10 @@ const config = {
|
|||||||
crawlContainer: '.nbk-container >div article',
|
crawlContainer: '.nbk-container >div article',
|
||||||
crawlFields: {
|
crawlFields: {
|
||||||
id: '@id',
|
id: '@id',
|
||||||
title: 'div.nbk-p-2 > h3 a@title | removeNewline | trim',
|
title: 'a.nbk-truncate@title | removeNewline | trim',
|
||||||
link: 'div.nbk-p-2 > h3 > a@href',
|
link: 'a.nbk-truncate@href',
|
||||||
address: 'div.nbk-p-2 > p | removeNewline | trim',
|
address: 'p.nbk-truncate | removeNewline | trim',
|
||||||
|
price: 'p.nbk-mb-0 | removeNewline | trim',
|
||||||
},
|
},
|
||||||
paginate: '.numbered-pager__bottom .numbered-pager--info li:nth-child(2) a@href',
|
paginate: '.numbered-pager__bottom .numbered-pager--info li:nth-child(2) a@href',
|
||||||
normalize: normalize,
|
normalize: normalize,
|
||||||
|
|||||||
Reference in New Issue
Block a user