crawler-ntust-course

1.0.1 • Public • Published

crawler-ntust-course

NPM version Build Status Dependency Status Downloads

Install

npm i -D crawler-ntust-course

Usage

This crawer is implementing the Colorgy Course Crawler Spec.

import Crawler from 'crawler-ntust-course';

// Initialize new crawler
var crawler = new Crawler();
crawler.year = 2015;
crawler.term = 1;
// or
crawler = new Crawler({ year: 2015, term: 1 });

// Start crawling, callbacks are provided by promise pattern
crawler.crawl()
  .then(function (data) { console.log(data); })
  .catch(function (err) { console.error(err); });

// Start crawling and log the progress down
crawler.crawl({ onProgressUpdate: function (progress) { console.log('Progress: ' + progress); } });

// Run a function after new data received
crawler.crawl({ onDataReceived: function (data) { console.dir(data); } });

// Get the crawled data
crawler.getData();

License

MIT © Neson

Readme

Keywords

Package Sidebar

Install

npm i crawler-ntust-course

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • neson