Skip to content

Commit

Permalink
feat: add example.js for development
Browse files Browse the repository at this point in the history
  • Loading branch information
philippdormann committed Apr 12, 2023
1 parent 9c08508 commit 147ce28
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions example.js
Original file line number Diff line number Diff line change
@@ -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);
}
})();

0 comments on commit 147ce28

Please sign in to comment.