Yle uutiset link crawler and API
- mongodb
- node
- npm
- pm2
git clone https://github.com/abulaatikko/jeltsin
; cd jeltsinyarn
cp config.sample config; vim config
sudo service mongodb start
node crawler.js
mongo jeltsin
pm2 start server/api.js --name "jeltsin-server"
curl localhost:8765/api
- http://jeltsin.pulu.org/api
- npm run build
- http://jeltsin.pulu.org/
Fetch items between two dates:
db.news.find({ added: { $gte: "2016-09-01T00:00:00.000Z", $lt: "2017-01-01T00:00:00.000Z" } }, { url: 1, title: 1, added: 1, _id: 0 }).sort({ added: -1 });
- NICE-TO-HAVE: use npm5 instead of yarn when it becomes available via os updates. dont break whats working
- NICE-TO-HAVE: use http://yle.fi/uutiset/rss
- NICE-TO-HAVE: https://www.npmjs.com/package/node-fetch