daily-menu

0.4.0 • Public • Published

daily-menu Build Status

Scraper utility tool to fetch daily menus around the Yco office.

daily-menu screencast

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:

License

MIT © Máté Farkas

Readme

Keywords

Package Sidebar

Install

npm i daily-menu

Weekly Downloads

0

Version

0.4.0

License

MIT

Unpacked Size

5.56 kB

Total Files

6

Last publish

Collaborators

  • wolfika