$ npm install --save middlebury-catalog
Scrape the course catalog for term 201590
. The URL is automatically
constructed based on the term.
const catalog = require('middlebury-catalog');
catalog('201590')
.catalogFromUrl()
.then(function (catalog) {
console.log(catalog.courses[0]);
});
Specify an XML file to scrape from. You must still provide a term to catalog.
const catalog = require('middlebury-catalog');
catalog('201590')
.catalogFromFile('test/test.xml')
.then(function (catalog) {
console.log(catalog.courses[0]);
});
Clone the repository then run:
$ npm install
Run the tests with:
$ npm test