Socket
Book a DemoInstallSign in
Socket

@payw/cau-food-scraper

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@payw/cau-food-scraper

A CAU restaurant menu scraper for Node.js

2.0.6
latest
Source
npmnpm
Version published
Weekly downloads
27
Maintainers
1
Weekly downloads
 
Created
Source

CAU Food Scraper (CAUFS)

A CAU restaurant menu scraper for Node.js

NOTE: You should follow the migration guide in favor of v2 release.

What's new in v2

  • 🎯 Promise-based precise data scraping without any wasting of time
  • 🚀 Boost up to 5x faster
  • 🗑 Reduce dependencies which are totally unnecessary

Installation

npm install @payw/cau-food-scraper
# OR
yarn add @payw/cau-food-scraper

Usage

// Node.js
const { CAUFS } = require('@payw/cau-food-scraper')
// webpack
// import { CAUFS } from '@payw/cau-food-scraper'

CAUFS({
  id: 'portalId',
  pw: 'portalPw',
  days: 1 // optional (default: 5)
}).then(data => {
  // Do something
})

Migration from v1 to v2

You should import the library differently.

/* v1 */
// Node.js
const foodScrape = require('@payw/cau-food-scraper').default
// webpack
import foodScrape from '@payw/cau-food-scraper'

/* v2 */
// Node.js
const { CAUFS } = require('@payw/cau-food-scraper')
// webpack
import { CAUFS } from '@payw/cau-food-scraper'

Currently, the chage below is deprecated and will be reverted back on the next major release.

Returning data type of Day and its children types had been slightly changed. The package includes a type definition with more detailed information.

/* v1 */
type Day = {
  date: string
  breakfast: Food[]
  lunch: Food[]
  supper: Food[]
}

/* v2 */
type Day = {
  date: string
  timeGroup: {
    breakfast: Restaurant[]
    lunch: Restaurant[]
    supper: Restaurant[]
  }
}

FAQs

Package last updated on 26 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.