Socket
Book a DemoInstallSign in
Socket

catalog.js

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

catalog.js

A JavaScript / TypeScript API for the Middlebury course catalog.

1.2.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

catalog.js

A JavaScript / TypeScript API for the Middlebury course catalog.

Build Status

Install

$ npm install --save middlebury-catalog

This updated NPM module is ESM only and is compiled to modern ES6+ JS.

Examples

Scrape the course catalog for a given term in one of two formats (YYYYSS or SYY) and a set of search parameters. The URL is automatically constructed based on the term and parameters. If given no search parameters, the scraper will use its predefined defaults.

import Scraper from ('middlebury-catalog');

const scraper = new Scraper('202190');
const catalog = await scraper.getCatalog();
 

or manually

import Scraper from ('middlebury-catalog');

const scraper = new Scraper('F21');
await scraper.scrape();
await scraper.parse();
const catalog = scraper.catalog;

Specify an XML file to scrape from.

import Scraper from ('middlebury-catalog');

const scraper = new Scraper('F21', searchParameters);
const catalog = await scraper.getCatalogFromFile("./test/test.xml");

Develop

Clone the repository then run:

$ npm install

Run the tests with:

$ npm test

Keywords

middlebury

FAQs

Package last updated on 26 May 2023

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.