Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.
/ pja-scrapper Public archive

Moduł dla NodeJS pozwalający na pobieranie danych z planu zajęć PJATK

Notifications You must be signed in to change notification settings

pjatk21/pja-scrapper

Repository files navigation

PJA schedule scrapper

Install

yarn add https://github.com/pjatk21/pja-scrapper.git
# or
npm i pja-scrapper

What's in the box?

  • Scrapper

Why?

  • There isn't any API access for schedule, because someone DDOSed old API and now it's gone :(

Example

import { Scrapper } from 'pja-scrapper'

async function testFetch () {
  const browser = await puppeteer.launch({
    headless: true
  })
  const scrapper = new Scrapper(browser)
  const result = await scrapper.fetchDay({ dateString: '2022-01-24' })
  console.log(result)
}

testFetch().then(() => process.exit(0))

FAQ

  • Script is running so slow on windows in headless mode: disable windows defender
  • Timeout warnings: ignore them, those requests will by retried on the end. You can still increase maxTimeout.
  • Is it possible to speed up script?: lower maxTimeout