1.0.1 • Published 7 years ago

@ryanburnette/fetch-flica v1.0.1

Weekly downloads
2
License
ISC
Repository
-
Last release
7 years ago

fetch-flica

Scrape from FLICA using node-fetch.

The issue is dealing with the login process. This library handles that for you. Once you're logged in you can fetch away. Log out when you're done.

Usage

Require. Set the FLICA URL prefix for the login and logout functions.

var FetchFlica = require('fetch-flica')

var f = new FetchFlica({
  flicaurl: 'https://endeavor.flica.net'
})

f.login('FLG012345','mypa$$word')

Use fetch as you normally would. The cookies which identify the session will be included.

f.fetch('https://endeavor.flica.net/full/CrewResources.cgi?ccName=NYC-CR9-FO&json=1&sDate=2018-04-30')
  .then(res => res.json())
  .then(text => console.log(text))
  .catch(e => console.log(e))

Logout when you're done.

f.logout()