This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user