siding-courses
v1.0.2
Published
Scrap courses from SIDING.
Downloads
1
Readme
SIDING Courses
Scrap courses from SIDING.
Installation
Run npm i siding-courses
.
Usage
const sidingScraper = require('siding-courses');
sidingScraper('your-siding-username', 'your-siding-password', msDelay, dir).then(() => {
// The results have now been saved in your specified dir.
}).catch(err => {
console.log(err);
});
If no msDelay
between successive term requests is specified, it will default to 3000 (3s).
It is important to give a delay in order to avoid making too many requests in a very short amount of time.
If no output dir is specified, it will default to ./data.json
.
Results will have the following structure:
[
..., {
id: 'course-id',
initials: 'course-initials',
name: 'course-name',
year: 'course-year',
term: 'course-term',
section: 'course-section',
department: 'course-department'
}, ...
]
Contributing
- Fork this repository
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'add my feature'
) - Push to your feature branch (
git push origin my-new-feature
) - Create a new Pull Request