Updated with new scraper
This commit is contained in:
parent
dfb104d30b
commit
fe7868b71c
5
app.js
5
app.js
@ -6,7 +6,7 @@ const log4js = require('log4js');
|
||||
const logger = log4js.getLogger();
|
||||
const cron = require('node-cron');
|
||||
|
||||
const retriever = require('./libs/retriever');
|
||||
const {retrieveNew} = require('./libs/retriever');
|
||||
|
||||
logger.level = 'debug';
|
||||
|
||||
@ -38,9 +38,10 @@ cron.schedule('10 15 * * 2,5', () => {
|
||||
});
|
||||
|
||||
cron.schedule('45 9 * * 3,6', () => {
|
||||
retriever();
|
||||
retrieveNew();
|
||||
|
||||
return -1;
|
||||
});
|
||||
|
||||
logger.info('Lot V3 started...');
|
||||
|
||||
|
3233
data/data.json
3233
data/data.json
File diff suppressed because one or more lines are too long
@ -19,8 +19,13 @@ function retrieveNew() {
|
||||
const ystring = fecha.format(yesterday, '/DD-MM-YYYY');
|
||||
|
||||
const lotData = jsonfile.readFileSync(file);
|
||||
const u = `https://www.euro-millions.com/results${ystring}`;
|
||||
|
||||
fetch(`https://www.euro-millions.com/results${ystring}`)
|
||||
console.log('retrieving:', u);
|
||||
|
||||
// https://www.euro-millions.com/results/15-02-2019
|
||||
|
||||
fetch(u)
|
||||
.then(res => res.text())
|
||||
.then(body => {
|
||||
const m = scrapeResults(body);
|
||||
|
Loading…
Reference in New Issue
Block a user