Skip to content

dnswd/scele-crawler

Repository files navigation

Scele Crawler

npm package

Build Status Coverage Status download status

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();

Screenshot

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);
});

About

Scele Crawler Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published