Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More β†’
Socket
Book a DemoInstallSign in
Socket

mtu-courses

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mtu-courses

πŸ› scrape all courses for a given semester from Michigan Tech's website

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

πŸ› mtu-courses

Scrape all courses for a given semester from Michigan Tech's website.

Install

npm i mtu-courses

Quickstart

const Courses = require('mtu-courses');

(async () => {
  const mtu = new Courses();

  await mtu.load();

  // Get all meeting dates for first loaded course
  console.log(mtu.courses.find(course => course.startDate !== undefined).getMeetingDates());

  const totalFee = mtu.courses.filter(course => course.online).reduce((accum, course) => accum + course.fee, 0);

  console.log(`It would cost an extra $${totalFee / 100} to take all offered online courses this semester.`);
})();

(Note that the Michigan Tech website/database system is quite slow and it takes around 13-15 seconds for await mtu.load() to complete.)

All dates/times are in UTC.

Fees are in cents instead of dollars to be consistent with the way financal data is usually handled in code.

πŸ“š Docs

Hosted on Github Pages.

Keywords

πŸ›

FAQs

Package last updated on 13 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