1
0

feat: Convert to modules
All checks were successful
Remote Deploy / deploy (push) Successful in 3s

This commit is contained in:
2025-08-31 16:48:40 +02:00
parent 1a29836e44
commit c82fef9e4f
9 changed files with 23 additions and 129 deletions

View File

@@ -1,9 +1,8 @@
const cheerio = require("cheerio");
const fetch = require("node-fetch");
import * as cheerio from "cheerio";
globalThis.File = class File {};
async function parseTeachers() {
export default async function parseTeachers() {
const url = "https://spsejecna.cz/ucitel";
const response = await fetch(url);
const data = await response.text(); // fetch needs .text() to get HTML
@@ -24,5 +23,3 @@ async function parseTeachers() {
return map;
}
module.exports = parseTeachers;