scele-crawler
v1.1.2
Published
crawler for scele.cs.ui.ac.id
Downloads
2
Readme
Scele Crawler
API Documentation
Install
npm i --save scele-crawler
Import
const sceleCrawler = require("scele-crawler");
Login
await sceleCrawler.login("SSO-USERNAME", "SSO-PASSWORD");
Profile
const profile = sceleCrawler.getProfile();
console.log(profile.npm);
console.log(profile.fullName);
console.log(profile.nickName);
Courses
const courses = sceleCrawler.getCourses();
courses.forEach(course => {
console.log(course.longTitle);
console.log(course.shortTitle);
});
Fetch Course Detail
const courseDetail = await courses[0].fetchDetail();
Title
Object.keys(courseDetail).forEach(title => {
console.log(title);
});
Announcement
console.log(courseDetail[title].announcement);
Content
courseDetail[title].contents.forEach(content => {
console.log(content.title)
console.log(content.type);
console.log(content.link);
console.log(content.comment);
});