daily-menu
v0.4.0
Published
Scraper utility tool to fetch daily menus around the Yco office.
Downloads
2
Readme
daily-menu
Scraper utility tool to fetch daily menus around the Yco office.
Prerequisites
- Node.js >=7
- npm
Install
$ npm install daily-menu
Usage
const dailyMenu = require('daily-menu');
dailyMenu()
.then(results => {
console.log(results); //=> array (or string) of daily restaurant offers
});
API
dailyMenu()
Returns a Promise
, which resolves to the scraped restaurant offers. The result object looks something like this:
[
{
"name": "Foo Bar",
"date": "2017-10-11T20:34:42.086Z",
"items": [
"Paradicsomleves",
"Burgonyafőzelék, feltét",
"Fűszeres csirkemell, salátaágyon",
"Pirított sertésmáj, tört burgonya"
]
}
]
items
is either a string or an array, depending on whether the restaurant provider was capable of parsing the HTML markup retrieved by the scraped.
CLI
$ npm install --global daily-menu
$ daily-menu
Typing this command will result in displaying the current restaurant offers in a table.
List of supported restaurants
This utility is currently capable of retrieving offers from these restaurants:
- Bohémia Sörkonyha
- Crystal Restaurant
- Fiáker Étterem
- Piazza del Grano
- István Pince Borozó & Étterem
- Mátyás Király Vendéglő
- Oliva Restaurant
- Puspa Konyhája
- Rundó Söröző - Étterem
- Trafik
License
MIT © Máté Farkas