2.4.0 • Published 4 years ago

@payw/cau-timetable-scraper v2.4.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Installation

npm install @payw/cau-timetable-scraper

You also need to install Puppeteer-related modules as its peer dependencies.

npm install puppeteer pending-xhr-puppeteer

v2.1.x Migration

From v2.1.0, a new feature has been arrived where CTTS returns lectures along with the colleges and majors information separately.

// v2.0.x
const lectures = CTTS({})

// v2.1.x
// Object destructuring
const { lectures, colleges } = CTTS({})

// Or
const scrapeResult = CTTS({})
const lectures = scrapeResult.lectures
const colleges = scrapeResult.colleges

API

import { CTTS } from '@payw/cau-timetable-scraper'

const { lectures, colleges } = CTTS({
  id: 'CAU Portal ID',
  pw: 'password',
})

Types

RefinedLecture

The CTTS function returns an array of refined lectures.

keytype
coveragesCoverage[]
yearnumber
semesterstring
campusstring
collegestring
subjectstring
majorstring
majorCodestring
gradestring
coursestring
sectionstring
codestring
namestring
creditstring
timestring
professorstring
closedstring
schedulestring
flexstring
notestring
buildingstring
roomstring
periodsPeriod[]

Coverage

keytype
coursestring
collegestring
majorstring

Period

keytype
day'mon'\|'tue'\|'wed'\|'thu'\|'fri'\|'sat'\|'sun'
startHnumber
startMnumber
endHnumber
endMnumber

Check out type definitions for more information.

2.4.0

4 years ago

2.3.0

4 years ago

2.2.0

4 years ago

2.1.5

4 years ago

2.1.4

4 years ago

2.1.3

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

2.0.0-beta.4

4 years ago

2.0.0-beta.3

4 years ago

2.0.0-beta.2

4 years ago

2.0.0-beta.1

4 years ago

2.0.0-alpha.4

4 years ago

2.0.0-alpha.3

4 years ago

2.0.0-alpha.2

4 years ago

2.0.0-alpha.1

4 years ago

2.0.0-alpha.0

4 years ago