mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
fixing neubaukompass && updating dependencies
This commit is contained in:
@@ -9,7 +9,7 @@ function normalize(o) {
|
||||
const address = o.address.split(' • ')[1];
|
||||
const title = o.title || 'No title available';
|
||||
|
||||
return Object.assign(o, {id, address, price, size, title});
|
||||
return Object.assign(o, { id, address, price, size, title });
|
||||
}
|
||||
|
||||
function applyBlacklist(o) {
|
||||
|
||||
@@ -5,7 +5,7 @@ const utils = require('../utils');
|
||||
function normalize(o) {
|
||||
const size = o.size || '--- m²';
|
||||
|
||||
return Object.assign(o, {size});
|
||||
return Object.assign(o, { size });
|
||||
}
|
||||
|
||||
function applyBlacklist(o) {
|
||||
|
||||
@@ -17,9 +17,9 @@ const neubauKompass = {
|
||||
crawlContainer: '.row article',
|
||||
crawlFields: {
|
||||
id: '@id',
|
||||
title: 'a@title | removeNewline | trim',
|
||||
link: 'a@href',
|
||||
address: 'div.p-2 > p:nth-child(3) | removeNewline | trim'
|
||||
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,
|
||||
|
||||
@@ -8,7 +8,7 @@ if (config.enableStats) {
|
||||
const http = require('http');
|
||||
http
|
||||
.createServer((req, res) => {
|
||||
res.writeHead(200, {'Content-Type': 'application/json'});
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
res.end(
|
||||
JSON.stringify({
|
||||
config,
|
||||
@@ -33,4 +33,3 @@ exports.setLastScrape = (serviceName, numberOfNewListsings) => {
|
||||
stats.foundScrapes[dt][serviceName] = numberOfNewListsings;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
10
package.json
10
package.json
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "Fredy",
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.1",
|
||||
"description": "[F]ind [R]eal [E]states [d]amn eas[y].",
|
||||
"scripts": {
|
||||
"start": "node index.js",
|
||||
"format": "prettier --write lib/**/*.js test/**/*.js *.js --single-quote --print-width 120",
|
||||
"test": "mocha --timeout 8000"
|
||||
"test": "mocha --timeout 9000"
|
||||
},
|
||||
"main": "index.js",
|
||||
"author": "Christian Kellner",
|
||||
@@ -31,12 +31,12 @@
|
||||
"chai": "4.2.0",
|
||||
"lowdb": "1.0.0",
|
||||
"request-x-ray": "0.1.4",
|
||||
"slack": "10.1.1",
|
||||
"slack": "11.0.2",
|
||||
"tg-yarl": "1.3.0",
|
||||
"x-ray": "2.3.3"
|
||||
"x-ray": "2.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "6.1.4",
|
||||
"mocha": "6.2.2",
|
||||
"prettier": "1.18.2",
|
||||
"proxyquire": "1.8.0"
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ describe('#kleinanzeigen testsuite()', () => {
|
||||
expect(notify.id).to.equal(
|
||||
kleinanzeigenDbContent.kleinanzeigen[idx]
|
||||
);
|
||||
expect(notify.size).that.does.include('m²');
|
||||
expect(notify.title).to.be.not.empty;
|
||||
expect(notify.link).that.does.include('https://www.ebay-kleinanzeigen.de');
|
||||
expect(notify.address).to.be.not.empty;
|
||||
|
||||
Reference in New Issue
Block a user