diff --git a/example.js b/example.js new file mode 100644 index 0000000..91e8fe3 --- /dev/null +++ b/example.js @@ -0,0 +1,17 @@ +const { parser, getMensaPlanHTML } = require('./main'); +const fs = require('fs'); + +(async function test() { + try { + const html = await getMensaPlanHTML({ + p: 'FO111', + e: 'herz' + }); + // console.log(html); + const parsed = await parser(html); + console.log(parsed); + fs.writeFileSync('./out.json', JSON.stringify(parsed)); + } catch (error) { + console.log(error); + } +})();